Automatic Logout Process

David H. Brierley dhb at rayssd.UUCP
Wed Aug 14 04:17:58 AEST 1985


> 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.

Please dont change the tty driver to log out idle users!!!!!!!
The simplest thing that can be done is to add an enforced timeout
mechanism to the shells.  Obviously this is only possible if you
have a source license.  The changes are fairly simple and have
been done by several people that I know of (myself included).
A somewhat harder thing to do is to be able to log off users that
simply run some program (i.e. vi) and then walk away.  To do
this you have to write one of the much dreaded "idle logout daemon"s.
Unless you are extremely clever this is best done by modifying
the source to one of the system programs like "ps" or "w".

You will note that nowhere did I mention changing the tty driver,
in fact I never even suggested making any changes to the kernel
at all.  All of this code is either in the shell or in a normal
user-mode process.  I will admit that we made one change to the
shell and the kernel to support the "idle logout daemon" that
we developed here.  We added a system call to set an unused bit
in the process structure and made the shell use that routine
before it placed a process into the background.  This way the
idle checker could easily ignore background processes without
having to analyze the process table entry in great detail.  It
makes it much nicer because it makes the idle checker more
efficient and more accurate.

Well, enough rambling for now.  I just wanted to illustrate
some of the things that can be done to force idle users off
the system.
-- 
	Dave Brierley
	Raytheon Co.; Portsmouth RI; (401)-847-8000 x4073
	...!decvax!brunix!rayssd!dhb
	...!allegra!rayssd!dhb
	...!linus!rayssd!dhb



More information about the Comp.sources.unix mailing list