System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set current login tty?

How to set current login tty?

Hi all,

On my system, pa/11.23, the function
pam_get_item(pamh, PAM_TTY, (void **)&terminal)) get NULL for terminal,

I do want to know how to make this function works as expected,

eg, current tty is /dev/pts/4,
the terminal would be `/dev/pts/4' by this function.
2 REPLIES
Steven E. Protter
Exalted Contributor

Re: How to set current login tty?

Shalom,

Answer: You don't, the system does this. If you start doing this, someone elses session might be assigned the terminal you were assigned.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: How to set current login tty?


Thanks,

However, on my system, the terminal is assigned NULL.

I thought it should be assigned some value eg, /dev/pts/4. but it was NULL.

Is it correct?