On Mon, 2002-08-19 at 22:24, Mark Weaver wrote:
> Dan Cox wrote:
> > Is there a way to auto logout inactive users? I have seen something
> > about TMOUT variable, but when I set it in /etc/profile and login at
> > console I get "bash: TMOUT read only" or something similar. So my
> > question is how do I get TMOUT to work? Also does TMOUT work for users
> > who are using X, gnome, kde, ect.? If not how could I set an auto logout
> > for those applications? Thanks for all the help.
> >
> > Dan Cox
>
> Dan,
>
> I can't help but wonder. Why would you want to?
>
Increase security a little and save resources by kicking out inactive
users. This is actually rather common on multi-user systems and the
default behavior of MDK if you engage one of the higher security
levels. To answer the original question though, msec will do this for
you; edit /etc/sysconfig/msec and add:
TMOUT=900
Replace 900 with the number of seconds of grace you would like. There
is a catch though. It only dumps truly inactive users. If a user walks
away with an editor running, or any program for that matter (tailing a
log file for instance) the system will not see the user as idle.
If resource conservation is what you are seeking, see:
/etc/security/*
Short of writing a frequent cron job that scans the logged in users and
checks for the time logged on and true activity, I cannot see a way to
kick someone off automatically if they are idle, but 'active' (running a
command). I could have overlooked something though.
--
Woody
---
Gatewood GreenWeb Developer/Systems Admin
Email:[EMAIL PROTECTED]
http://www.linif.org/ Linux in Idaho Falls Linux User Group
---
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com