Auto-logoff facility in Unix

Arnold Robbins arnold at gatech.UUCP
Wed May 9 03:39:59 AEST 1984


[This Space For Rent]

This would really only work on USG Unix, but if you have the TIMEOUT
facility in your /bin/sh, and you (i.e. the system administrator) want to
force auto-logout, it is pretty easy.  Just add two lines to /etc/profile:

TIMEOUT=...	# set to amount of time
readonly TIMEOUT

The USG sh, when it is a login shell, reads /etc/profile, and then .profile
in the home directory.  Making TIMEOUT readonly will 1) keep users from
changing it, and 2) automatically export it to subshells.

Of course the knowledgeable/devious user can always get around it:  

while :		# : exits w/value 0, or true
do
	sleep 300	# sleep 5 minutes
done

which keeps the port tied up, the shell busy, and doesn't use a whole
lot of cpu time. Nothing's perfect.

-- 
Arnold Robbins
CSNET: arnold at gatech
ARPA:  arnold%gatech.csnet at csnet-relay.arpa
UUCP:  ...!{akgua, allegra, rlgvax, sb1, ut-sally}!gatech!arnold

"All this digital stuff is just a fad.  Analog is the way to go."
	-- William M. Robbins, 1984



More information about the Comp.unix.wizards mailing list