Logging off idle users under SCO Xenix

mike at bria.UUCP mike at bria.UUCP
Wed Jan 9 17:29:32 AEST 1991


In article <645 at quad.sialis.com> dts at quad.sialis.com (David Sandberg) writes:
>I need to find a program which will automatically log out users
>who haven't touched their terminals in a certain length of time.
>I've heard of a program called untamo from the comp.sources.unix
>archives which does this, but my impression is that it is rather
>BSD-dependent.  If anyone has a SCO Xenix 2.3.2 solution to this
>quandray, I would be very grateful to them if they'd fill me in.
>(Yes, I have the development system, so source is an option.)

Well, yup, I actually do have a general purpose program called "watchdog"
that will monitor processes and zap 'em if they linger.  I originally
wrote it under AIX (but it works swimmingly under XENIX) to kick our
programmers off modems.  How watchdog differs from idleout is that
watchdog monitors *any* type of process that you want it to, not just
login shells (it's great for zapping turkeys who dialup a system 3000
miles away, and then go out for lunch without disconnecting ...)

Generally, how it works is this: you tell watchdog what processes you're
looking for (in your case "-sh" for login shells), what is the amount
of time that the associated terminal must be idle before the process is
killed, and the interval for checking up on people.  Watchdog will then
nice itself and become a (rather deadly) daemon.  Everytime it nails
someone, it updates a text file /usr/adm/watchdog, telling you when it
got 'em and why.

As an aside, I also wrote a penable and pdisable for XENIX, which will
enable and disable ports ala telinit or enable/disable; the difference
being that if you pdisable a port, all processes associated with said
port are killed (violently, at times :-) unlike disable, which wimps out
and moans how someone is on that port.

Remember, if you're gonna kill 'em, kill 'em fast and kill 'em hard!
And if you want the watchdog, send mail to uunet!bria!mike

-- 
Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation
UUCP: ...!uunet!bria!mike
--
technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly
found to be saying things like "Well, it works on my DOS machine ..."



More information about the Comp.unix.xenix.sco mailing list