Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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