kill -9 <PID>

is the command you want to wipe out any task running.  User ROOT can kill
tasks not associated with this, so it woul d have to be a ROOT owned crontab
entry.

Also you may want to look at the grep piping into cut to get the acual PID's
of the the output generated from the grep.  Do a man on cut for the
specifics.

Lastly I wouldn't put cron entry to run every minute.  Better yet is to have
a shell script that runs the grep|cut as mentioned, sleeps for 1 minute, the
loops back to the top.  Use Cron to kickstart it for the first time, at
8:00pm <or whatever> once a day.  The script can check to see if the script
is already running, and if so, just exists gracefully so that you don't have
a bunch of the same script running.  

Essentially use Cron as watchdog, but the script actually performs the work
and goes to sleep and then works again.

Cheers!
Mark Wignall

-----Original Message-----
From: Mark Weaver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 02, 2000 7:17 PM
To: Renaud OLGIATI
Cc: *List Linux-Newbie-MK
Subject: Re: [newbie] Logging off a user ?


the answer to your question is yes, and you may want to search the
archives on this one because I think something like this was covered about
a month ago, but I can't recall enough of the details to relate the
adventure for you. Ordinarily I would simply search my message database
and forward the appropriate message(s) to you covering this subject since
I keep almost all of them from the list. However, after this weekend's
tragic implosion of my partition tables I've lost better than 3GB worth of
data. My list archive was one of the casualties.

-- 
Mark

Larry is NOT a cucumber...he's a stinkin pickle...
        WITH WARTS!

          registered linux user # 182469
                =/\= PINE 4.21 =/\=
*----------------------------------------------------*

Surprisingly on Wed, 1 Nov 2000 Renaud OLGIATI had this to say!

> Is there a way fior the sysadmin to log a user off ?
> 
> My son liked Kboard so much he spent the whole night playing, and I was
> thinking of finding a way to keep him off the computer during the hours
> he's supposed to sleep.
> 
> Now, If there was a way for root to terminate the session of a user, I
> thought I coul put in crontab a job to run every minute between the hours
> of 20 00 and 08 00, that would grep the output of who, and log him off if
> he's logged in.
> 
> But can it be done ?
> 
> TIA,
> 
> Cheers,
> 
> A worried father, on the banks of the Paraguay River.
>  --   
>                   Blessed are they who can laugh at themselves
>                     for they shall never cease to be amused.
>  
>               ---  http://personales.conexion.com.py/~rolgiati  ---
>  
> 
> 


Reply via email to