Operating System - HP-UX
1835062 Members
1985 Online
110073 Solutions
New Discussion

Re: Inactive session logoff

 
SOLVED
Go to solution
Scott G. Gallup
Advisor

Inactive session logoff

I would like to have any login session automatically log off if the session has been inactive for a certain amount of time (time yet to be determined). Can this be done with a system setting?
Or is a 'script' required and if so any ideas/examples?
The system is currently running HP-UX 10.20.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Inactive session logoff

All you have to do is set the TMOUT environment variable to a non-zero number od seconds. If no input is received within that number of seconds the shell is terminated.

Man sh_posix for details. You could put this entry in the users' .profile.
If it ain't broke, I can fix that.
PIYUSH D. PATEL
Honored Contributor

Re: Inactive session logoff

Hi,

You can put the following entry in the /etc/profile or .profile file of the users.

/etc/profile for all users.

TMOUT=seconds

TMOUT affects how the shell itself operates. So if someone is sitting at a
shell prompt too long, they get logged out.

But if they, for instance, run the vi editor and then walk away, TMOUT does no
good. The vi editor ignores TMOUT. While any program could obtain TMOUT and
respect it, none except the shell do (as far as I know).

Even if they did, the editor would probably just exit and thus the shell would
then start a second TMOUT period.

Thats it.

Regards,
piyush