On Thu, Oct 14, 2010 at 03:28:20PM -0400, Brad Tilley wrote:
> Brad Tilley wrote:
> > I created (...) /etc/profile to force sh and ksh to logout users
> > after a certain period of idleness:
> >
> > $ cat /etc/profile
> >
> > # Force sh and ksh to logout idle users after 15 minutes
> > # Prevent normal users from disabling this setting
> > readonly TMOUT=900
> > export TMOUT
> >
> > That works great. I've tried to do the same to (...) csh.
>
> Replying to myself. I can't seem to make csh auto logout inactive users.
> So I did this:
>
> rm /bin/csh
> cp /bin/ksh /bin/csh
>
> Any good reason to not do this?
Allow me to echo the general "wtf?!" sentiment. You do realize that the
following "hack" works even for ksh, right?
$ export TMOUT=10
$ readonly TMOUT
$ exec env -i HOME="$HOME" PATH="$PATH" ... /bin/ksh
I suspect that a less-than-unbreakable solution might be enough for PCI
compliance; in that case, look at sysutils/idled or pester the devio.us
guys for their logout daemon.
Joachim
--
getenv, putenv, setenv, unsetenv (3) - environment variable functions
http://www.joachimschipper.nl/