LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-17-2008, 11:38 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Automatically Disconnecting Users After Five Minutes Idle Time


Hi there --

I have a server that is accessed from the Internet, and I want to to automatically disconnect users after five minutes of their account being idle.

The users on the server have either the bash or tcsh shell available to them. My plan is to add the following line to the /etc/bashrc and /etc/csh.cshrc files:

Code:
TMOUT=300
I had several questions concerning this approach:

1. Is this the correct method to use to automate logouts of idle users?
2. Is this the correct syntax to use for the bashrc and csh.cshrc files?
3. Once the file modifications are made, how can I have the changes implemented for all users?

Thanks.
 
Old 05-18-2008, 07:33 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
if they are connecting using ssh you could use the
Code:
ClientAliveInterval
ClientAliveCountMax
Options
 
Old 05-18-2008, 07:55 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...
Quote:
Originally Posted by kaplan71 View Post
Is this the correct syntax to use for the bashrc and csh.cshrc files?
The BaSH manual shows the variable can be exported like that. The Csh manual shows it uses "autologout".


Quote:
Originally Posted by kaplan71 View Post
Once the file modifications are made, how can I have the changes implemented for all users?
Sourcing global variables is done once, on login.
 
Old 05-21-2008, 10:13 PM   #4
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
As far I know you have to add it in /etc/profile, say under the line
HISTSIZE=1000
TMOUT=300

This will apply for all users in system. If want to apply to a particular user then add it in user .bash_profile

Hope this helps.
 
  


Reply



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
wifi keeps disconnecting when the computer is idle tjyorkshire Linux - Wireless Networking 2 06-27-2007 10:07 AM
suspend2 to suspend after computer is idle after x minutes frankie_DJ Linux - Software 0 09-17-2006 04:47 PM
auto turning off monitor after 15 minutes idle? webazoid Linux - Software 1 07-10-2004 08:41 AM
System will automatically close my x server after a certain idle time. ICO Slackware 1 02-16-2004 11:26 AM
Left idle a few minutes and freezed up d4d4n9 Mandriva 15 11-19-2003 09:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:34 PM.

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