UnixServerAdmin

Server Administration & Management

How to Auto Logout TimeSet

Ques : 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.

Ques :- 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.

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

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

# vi /etc/profile

add following line
————————————————————–
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-onlyand 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.

# cd /etc/profile.d/

# touch sessiontimout.sh

# vi sessiontimout.sh

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

Advertisements

July 21, 2011 - Posted by | Unix/Linux | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: