Operating System - HP-UX
1833652 Members
3855 Online
110062 Solutions
New Discussion

Re: HP-UX: Console session logout after idle time

 
SOLVED
Go to solution
Karen Leung
Occasional Contributor

HP-UX: Console session logout after idle time

Can the console session be configured to logout after some idle time?

4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: HP-UX: Console session logout after idle time

Hi Karen:

Set a non-zero value for the environmental variable TMOUT. When thusly set, the shell will terminate if a command is not entered within the prescribed number of seconds after issuing the PS1 prompt.

For instance, to logoff the session after 1-minute of inactivity do:

# TMOUT=60
# export TMOUT

This can be added to the user's $HOME/.profile (including root's).

Regards!

...JRF...
Michael Tully
Honored Contributor

Re: HP-UX: Console session logout after idle time

Hi,

You would need to add something to your
/etc/profile. This should work....

if tty=/dev/console
then
TMOUT=3600 # 5 minutes
fi

TMOUT is part of the shell


Regards
-Michael
Anyone for a Mutiny ?
Deshpande Prashant
Honored Contributor

Re: HP-UX: Console session logout after idle time

HI
Add following to your /etc/profile.

TMOUT=3600 # 5 minutes
readonly TMOUT

This will make this timeout (TMOUT) parameter not changable for any user.

Thanks.
Prashant.

Take it as it comes.
Karen Leung
Occasional Contributor

Re: HP-UX: Console session logout after idle time

Thanks for the idea of TMOUT variable.

I amended the if statement as follows to get the TMOUT applicable to console session only...

if [ `tty` = "/dev/console" ]