Autologout of unused terminals

Keith Gabryelski ag at elgar.UUCP
Thu Dec 1 14:40:01 AEST 1988


In article <74 at attibr.UUCP> vch at attibr.UUCP (Vincent C. Hatem) writes:
>You could also use 'who -u' (on Sys V), which tells the idle time...

Idle time messages on some versions of system V who are broken.  They
use st_mtime instead of st_atime.  From `man stat':

sed -n "s/(S)/(2)/gp" 				# if appropriate.

	  st_atime   Time when file data was last accessed.  Changed
		     by	the following system calls: creat(S),
		     mknod(S), pipe(S),	utime(S), and read(S).
						      ^^^^^^^

	  st_mtime  Time when data was last modified.  Changed by the
		    following system calls: creat(S), mknod(S),
		    pipe(S), utime(S), and write(S).
					   ^^^^^^^^
The idle daemon code is trivial (written during halftime on Monday).
If anyone would like a copy, send me mail.

In article <3603 at jpl-devvax.JPL.NASA.GOV> lwall at jpl-devvax.jpl.nasa.gov
(Larry Wall) brings up:
>[...] but idle-killers are so easy to spoof, unless you disable
>people from executing utime() or ioctl().

The daemon code, IMHO, should not be intended for use against
malicious(*) or unwilling idlers.  The code is used to logout users
who forget to logout.

Also, an idle daemon may not be appropriate for some (even most)
sites, but it is a valid option for a few.  You don't even have to be
fascist about the code, set it for three hours if you like ... with
warning messages.

(*) ``malicious idlers'' here is defined as a user that hogs a
terminal (by being logged in) for an usually long period of time
without using the terminal.

nohup(1) is a viable alternative in a lot of the idle terminal cases.

Pax, Keith

-- 
ag at elgar.CTS.COM         Keith Gabryelski          ...!{ucsd, jack}!elgar!ag



More information about the Comp.unix.wizards mailing list