Saturday, August 29, 2009

Automatic logout in Ubuntu Servers

Hi my friends, i decided to open my blog that is focusing on Linux and Security. I hope you will get it useful and enjoyable and i hope i can hear from you and we can share the knowledge.

The first post is about:

How to configure: automatic logout in Ubuntu\Debian Server :


As we know in servers platforms (Hosting, ...), they are using only command line that there is no way for using screen-saver as auto log out of users/admin after certain time. Also, sometimes giving limited time for who logged in through SSH-Server or ftp or any thing by terminal. Solving of this problem by doing the following:

first, be a root

sudo -i
enter root password

edit /etc/profile file

# gedit /etc/profile &

add at the end of file TMOUT= number in seconds,

TMOUT=60

the last addition means, log out after 60 seconds.

To test it in your Ubuntu Box, change the TMOUT=3 and save the file. Now open the terminal and type:

sudo -i
enter the password

Now wait for three seconds, you will log out automatically, right?


That is all, i hope it is useful ;-)

2 comments: