Auto logoff

david nicol whatever at davidnicol.com
Mon Jul 22 22:16:57 CDT 2002


Bill Cavalieri wrote:
> 
> I have several remote x display's setup, and would like to auto log
> users off when they've been idle for 5 minutes.
> 
> Anybody come across any scripts, etc...
> 
> Thanks,
> 
> -Bill

it would be a trivial addition to the telnet daemon, or a shell,
involving the alarm() system call.  Call alarm(300) every time
some data comes through and there you are.  It would also be trivial
to defeat, for instance

	while date do sleep 275 done &

but your casual user who walks away from their session isn't going
to do that.

If your really nice you'd have the timeout be read from an environemnt
variable and share the patch with whoever maintains telnetd or bash or
xterm or whatever it is you decide to patch.

-- 
what would Egil Skallagrimson do?




More information about the Kclug mailing list