Summary: restrict CPU-timelimit

From: Manfred Liebchen (liebchen@rrz.uni-koeln.de)
Date: Tue Jul 29 1997 - 02:03:04 CDT


My query:
I have the following problem; I want to restrict the CPUtimelimit for
each ineractive user on my machine to 20 minutes(i.e). I am
running Solaris 2.5.1 HW 4/97. After 20 Minutes a user must be
automatically logged out. Is it possible under Solaris 2.5.1 ?
How can I do this ?

I received two answers:

first:
Install "ideald" it will do the job.
From: Parthiv Shah <parthiv@nscc.com>

second:
There's no way to force them off if they are still active on the system
unless you write a script to do it. If you want idle sessions to be
disconnected after 20 minutes you can use the autologout features of some
shells (tcsh for instance).

If you want to throw people off after 20 minutes regardless of what they
are doing, I suggest writing a script to run out of cron that looks at the
output from last or who or w (ie the commands built on top of wtmp and
utmp) and calculates how long a user has been on the system; if it's more
than twenty minutes it does a ps -ef for that user and sends a kill -TERM
and and kill -9 to all their processes.
From: Shriman Gurung <shriman@venus.co.uk>

Greetings
M. Liebchen



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:59 CDT