Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Michael Sternberg <sternberg@phys.uni-paderborn.de>
Subject: Re: Terminate user sessions.
Date: 2000/05/17	[thread overview]
Message-ID: <39226383.CB009BFD@phys.uni-paderborn.de> (raw)
In-Reply-To: 39224a02$0$777@proctor

"Michael J." wrote:
> finger -f | grep -v root | cut -f 1 -d " " | kill . . . . . .

You need ps.  Here are two solutions:

All user pids:

    ps -eo pid,user | awk '! /root/ && ! /PID/ {print $1}' | xargs kill

Pids of logged-in users only:

    ps -eo pid -u `u | sed s/root//` | tail +2 | xargs kill

Note that the pids just get a sig; they may choose to ignore it, unless
you give them kurare #9.


But how about:

    init s



Regards,
-- 
Michael Sternberg,  Dipl. Phys.          | Uni-GH Paderborn
http://www.phys.uni-paderborn.de/~stern/ | FB6 Theoretische Physik 
phone: +49-(0)5251-60-2329   fax: -3435  | 33098 Paderborn, Germany
"Who disturrrbs me at this time?"  << Zaphod Beeblebrox IV >>	<*>



      reply	other threads:[~2000-05-17  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-17  4:00 Terminate user sessions Michael J.
2000-05-17  4:00 ` Michael Sternberg [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox