Unix administration - IDLED Replacement?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2006 > IDLED Replacement?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author IDLED Replacement?
DMFH

2006-01-05, 8:05 am

All:

I'm an OpenBSD V3.7 user, I use 3.7 for my production systems. The idled port
is apparently broken (won't compile from the ports tree), and the problem is
likely just a port that's not been maintained for a while (the code is quite
old too!)

I'm looking for a utility that will scan the idle time of logged in users
every so often, and automatically end shell sessions that have been idle too
long - old school problem, indeed.

Thanks in advance for any replies. A Happy New Year to all those celebrating a
holiday in the Winter Season!

-DMFH

----
__| |_ __ / _| |_ ____ __
dmfh @ / _` | ' \| _| ' \ _ / _\ \ /
\__,_|_|_|_|_| |_||_| (_) \__/_\_\
----
Michael Trausch

2006-01-05, 8:55 pm

DMFH wrote:
> All:
>
> I'm an OpenBSD V3.7 user, I use 3.7 for my production systems. The idled port
> is apparently broken (won't compile from the ports tree), and the problem is
> likely just a port that's not been maintained for a while (the code is quite
> old too!)
>
> I'm looking for a utility that will scan the idle time of logged in users
> every so often, and automatically end shell sessions that have been idle too
> long - old school problem, indeed.
>
> Thanks in advance for any replies. A Happy New Year to all those celebrating a
> holiday in the Winter Season!
>
> -DMFH
>


Hrm. Old code indeed.

The site was rather painful for me to look at, in fact.

What shells do your users use? From what I can see, both ksh and bash
support the environment variable TMOUT, and allow you to make it
read-only by setting it with the shell-builtin "readonly" (irrelevant
shell variables snipped for clarity):

[0:af/f/fd0man> readonly
[0:af/f/fd0man> readonly TMOUT=30
[0:af/f/fd0man> readonly
declare -r TMOUT="30"
[0:af/f/fd0man> timed out waiting for input: auto-logout

That was bash on a NetBSD system. The same thing happens with ksh on my
FreeBSD box:

fd0man@allspice$ readonly
KSH_VERSION
TMOUT
fd0man@allspice$ ksh: timed out waiting for input

If the user attempts to change it:

fd0man@allspice$ TMOUT=3
ksh: TMOUT: is read only

It looks like tcsh supports the same sort of thing, but not original
csh. YMMV... here is a link to a table of shell equivalents just in
case you may want/need it:

http://fringe.davesource.com/Fringe...hell_Conversion

Since OpenBSD's default shell is sh (ksh, pdksh), you should be able to
enforce timeouts if your users don't use a nonstandard shell. If you
only have sh, ksh, bash, or tcsh in /etc/shells, then you should be able
to enforce it unless a user decides to remain logged in intentionally
while remaining idle, which you could probably detect with a cron job
running as frequently as every few hours.

HTH,
Mike
DMFH

2006-01-06, 7:59 am

On 2006-01-06, Michael Trausch <michael.trausch@comcast.nope.net> wrote:

> What shells do your users use? From what I can see, both ksh and bash
> support the environment variable TMOUT, and allow you to make it
> read-only by setting it with the shell-builtin "readonly" (irrelevant
> shell variables snipped for clarity):


Thank you very much for this excellent and informative response. I threw in
the towel yesterday on IDLED after gdb couldn't read the corefile it produces
after a few seconds - no backtrace, no debugging, ugh - I think this was
because of either the way it was compiled or I read something about tracing
being unavailable on Sparc core's until somewhere in 2004, however, I am a
core analysis newbie.

----
__| |_ __ / _| |_ ____ __
dmfh @ / _` | ' \| _| ' \ _ / _\ \ /
\__,_|_|_|_|_| |_||_| (_) \__/_\_\
----
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com