From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b051133c6b8c6ac2 X-Google-Attributes: gidfee84,public From: Michael Sternberg Subject: Re: Terminate user sessions. Date: 2000/05/17 Message-ID: <39226383.CB009BFD@phys.uni-paderborn.de>#1/1 X-Deja-AN: 624450131 Content-Transfer-Encoding: 7bit References: <39224a02$0$777@proctor> X-Accept-Language: de, en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.uni-paderborn.de X-Trace: news.uni-paderborn.de 958555011 29987 131.234.208.136 (17 May 2000 09:16:51 GMT) Organization: Universitaet Paderborn Mime-Version: 1.0 NNTP-Posting-Date: 17 May 2000 09:16:51 GMT Newsgroups: comp.unix.osf.osf1 "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 >> <*>