1828340 Members
3228 Online
109976 Solutions
New Discussion

session autotermination

 
SOLVED
Go to solution
Andrej Vavro
Frequent Advisor

session autotermination

Hi,

where I can setup my SuSE distribution to kill a user session after e.g. 1 hour inactivity?

Thanks
Andrej
3 REPLIES 3
Balaji N
Honored Contributor

Re: session autotermination

hi

try using the shell's timeout feature.

if there is no activity for a certain period of time the shell can be made to timeout.

see your shell man page for more info.

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Steven E. Protter
Exalted Contributor
Solution

Re: session autotermination

Most shell's have a feature to set TMEOUT variable.

In /etc/profile

or

/home/username/.bash_profile

add the following code

TMEOUT=3600
export TMEOUT

This will time out shell sessions that are inactive for an hour. If however the user has anything going on even a vi /filename session, the TMEOUT won't work.

It will effectively clean anything up thats on a dollar prompt.

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
Caesar_3
Esteemed Contributor

Re: session autotermination

Hello!

You can use the TMEOUT variable
or you can write a script that will check
the time of proccesses and stop the wanted
this way you could make a rulles for the
proccess, stop some one or leave to run.

Caesar