How To : Auto Logout


What is this auto logout?
Ans : Auto logout is a concept to force user to logout from the remote server. If the open session to remote server is idle for a given time.


So why actually we require auto logout?
Ans : As a security measure, This is good practice to set this, because its not a good idea/practice to keep open terminal idle.


How to accomplish this?
Ans : This can be achieved by two ways.

1. Open /etc/profile and append TMOUT variable. See my below example

Export TMOUT=600 # 10 minutes in seconds
typeset -r TMOUT
This will set time-out to 600 sec(ie 10mins) and I have given typeset -r which read-only and will not allow users to change this. Save the file and exit.



2. By creating /etc/profile.d/sessiontimout.sh file then keeping above mention entries in it.
Export TMOUT=600 # 10 minutes in seconds
typeset -r TMOUT
Now save and exit the file

As this is a script we have to change the permissions too.
#chmod +x /etc/profile.d/sessiontimout.sh

Please share your thoughts on this.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    0 comments:

    Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here