1827294 Members
2193 Online
109717 Solutions
New Discussion

login session timeout

 
SOLVED
Go to solution

login session timeout

Hi,

can anyone tell me how to set up inactivity time out for user sessions in HP-UX 11.0?

Thanks & regards,
Jegi
NBC
2 REPLIES 2
Chris Calabrese
Valued Contributor
Solution

Re: login session timeout

There's no general purpose mechanism I know of that works in all situations, but putting
TMOUT=seconds; export TMOUT
in /etc/profile will set the shell-level timeout for all users of sh or ksh to . 1800 would be a typical value.
Brainbench MVP for Unix Administration and Internet Security, SANS Review Editor, and Center for Internet Security HP-UX Benchmark project leader
Bill Hassell
Honored Contributor

Re: login session timeout

And for csh users, the variable is autologout and the units are in minutes. To force users to adhere to the TMOUT value (ksh, POSIX, bash) you can put this statement into /etc/profile:

export readonly TMOUT=14400

which forces every login shell to timeout in 4 hours or no activity. Note this also affects root's login and once set to readonly, the value in the shell cannot be changed, even by root. It's often common to set root's timeout to less than an hour to avoid open sessions on an open terminal or console.

Note that this timeout only counts time when the shell is idle. If a smart user starts another shell or perhaps a copy of vi, the timer will not run and the 'session' will never timeout.


Bill Hassell, sysadmin