Automatic Logout Process

Matt Dillon dillon at ucbvax.ARPA
Sat Aug 17 06:50:00 AEST 1985


>> Does anyone out there in Netland have source to a program that will
>> log users out automatically if their terminals have been idle for a
>> specified amount of time and they have no processes running???? Sys V
>> or 4.2bsd will do....
>> 
>
>I would suspect that a mod to the tty driver would be appro.  (Fake out
>DTR/CD going inactive on timeout.)  Due to the needed location, this
>is highly system dependent.
>

	Well, I think a mod to the tty driver would be somewhat extravagant.
I see two possibilities:  1) modify the CSH or SH (or whatever) by using the
4.2 ITIMER or ALARM routines to check activity every once in a while.  2) 
write a daemon to look over the system (just one daemon, running as root),
and kill any CSH's or SH's that have no running processes and have been idle
for a long time.

	I myself would prefer (1), mod'ing the CSH.  One thing that was done
here in Berkeley for CS50 classes was to modify the CSH the students used to
kick them out after a certain amount of time on the computer, and to not 
allow them to log in out of their scheduled lab time.

	(2) seems undesireable, as it would take a lot of system time 
accessing the proc-table, etc... and not everybody wants their CSH killed.
At Berkeley, it is common to see a prof' logged in from his office for 3
days straight, Idle.

	Also, for (1), you would want an awful long timeout, say, check every
3 hours or something, so an IDLE CSH doesn't take up system time.


				-Matt

P.S. Sorry, don't have any already-written source for this.



More information about the Comp.sources.unix mailing list