In GNU/Linux the root access is the basis for any system level alterations. Administrators stay on as ‘root’ or forget to logout after finishing their work and leave their terminals unattended.The answer to solve this problem is to make the bash shell automatically logout after not being used for a period of time. For this we use the special linux variable TMOUT to set the time.
1. Login as root
2. Switch to the root home directory (by default it will
be in the root home)
3. Run nano .bashrc
4. Add the line TMOUT=3600 after ‘HISTFILESIZE=…’
5. Save the file and exit.
Note : The time is given in seconds i.e, 3600 = 1 hour.