Re: making non-tty login sessions



On Aug 31, 3:36 pm, Bill Marcum <marcumb...@xxxxxxxxxxxxx> wrote:
On 2009-08-31, bing1351 <bi...@xxxxxxxxx> wrote:> I want to do the following:

execl("/bin/login", "login", buf, NULL);
}

code runs, but after the execl, login fails with a "FATAL: bad tty" on
the system log.

How can I do this?

Use a pty, or replace /bin/login with some other method to authenticate the
user and start a shell as that user.

Can I prompt for the password and make the right calls into PAM right
in my code?
Pointers to example code links would be appreciated. I'm not well
versed in PAM.
.



Relevant Pages