Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 1998 16:11:22 -0500
From:      Jonathan Lemon <jlemon@americantv.com>
To:        Dima Dorfman <webmaster@zwb.net>
Cc:        Cliff Addy <fbsdlist@federation.addy.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Forced logoff
Message-ID:  <19980413161122.56029@right.PCS>
In-Reply-To: <3.0.5.32.19980413134702.00962cc0@207.213.224.25>; from Dima Dorfman on Apr 04, 1998 at 01:47:02PM -0700
References:  <3.0.5.32.19980413132956.00969d80@207.213.224.25> <3.0.5.32.19980413134702.00962cc0@207.213.224.25>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 04, 1998 at 01:47:02PM -0700, Dima Dorfman wrote:
> That's not really what I'm looking for.  Let's say, there is a user that is
> about to break into your system.  You _could_ use 'shutdown -k', but let's
> say that your boss is writing a very important document, and he's not
> autosaving it.  You log everyone off, and your boss kills you because he
> needs to write it all over again.
> 
> I'm looking to kick one user at a time.

    ps -aux | awk '$1 == "username" { print $2 }' | xargs kill

Will happily kill every process belonging to a specific user.
--
Jonathan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980413161122.56029>