Saturday, August 14, 2010

Automatic logout of inactive sessions in Linux and UNIX

To setup automatic logout of the inactive sessions in UNIX and Linux,
Set the TMOUT variable in /etc/bash.bashrc.local and /etc/profile.local 


For Example:


TMOUT=

TMOUT=0  is to set infinite time out or disable the automatic logout


To set this time out setting for a particular user:



Set the following in .profile or .bash_profile file which is available in each user home directory 


For example:
export TMOUT=600