LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-25-2006, 02:06 AM   #1
moinpasha
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Rep: Reputation: 0
Timeout session


Hi.How do i set timeout session in linux?
If user has no session activity(console,remote login ,etc)for the pre-defined period of time,system should force session timeout and user must re-logon.
 
Old 09-25-2006, 01:41 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,331

Rep: Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089
In the .profiles of your users (or in the system-wide profile in /etc/), set a TMOUT=<number>, such as TMOUT=18000. That'll be the number of seconds. In this case, 5 hours of inactivity, and their sessions will drop.

I have a few problems users that this works for.
 
Old 09-26-2006, 01:45 AM   #3
moinpasha
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Original Poster
Rep: Reputation: 0
thank u sir.but can u tell me the precise location of this file.i could not locate it in /etc/.
 
Old 12-28-2006, 11:21 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,331

Rep: Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089Reputation: 8089
Quote:
Originally Posted by moinpasha
thank u sir.but can u tell me the precise location of this file.i could not locate it in /etc/.

It is not in /etc. The .profile (or .bashrc), file will be in the users own home directory. The default profile file is sometimes in /etc, sometimes in /etc/default, depending on your distribution. It will sometimes be called /etc/profile.

Last edited by TB0ne; 12-28-2006 at 11:22 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba session timeout ?? ALInux Linux - Networking 0 04-28-2006 05:01 PM
session timeout for cookie does not work Linh Programming 2 08-18-2004 03:42 PM
How to change the timeout on a telnet session? gimpytoday Linux - Networking 1 06-23-2004 11:24 AM
wu-ftp session timeout howto? heatlill Linux - General 3 04-02-2003 06:04 PM
proftp session timeout artman62 Linux - Networking 2 01-08-2003 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration