From owner-freebsd-questions Mon Jun 17 17:46: 5 2002 Delivered-To: freebsd-questions@freebsd.org Received: from empty1.ekahuna.com (empty1.ekahuna.com [198.144.200.196]) by hub.freebsd.org (Postfix) with ESMTP id D847C37B43C for ; Mon, 17 Jun 2002 17:45:58 -0700 (PDT) Received: from pc-02 (pc02.ekahuna.com [198.144.200.197]) by empty1.ekahuna.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com for ; Mon, 17 Jun 2002 17:45:58 -0700 From: "Philip J. Koenig" Organization: The Electric Kahuna Organization To: questions@FreeBSD.ORG Date: Mon, 17 Jun 2002 17:45:57 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: kicking users Reply-To: pjklist@ekahuna.com In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Message-ID: <20020618004558320.AAA595@empty1.ekahuna.com@pc02.ekahuna.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Mon, 17 Jun 2002 12:45:16 -0400 > From: Mike Galvez > > On Mon, Jun 17, 2002 at 06:01:56PM +0200, Roman Neuhauser wrote: > > How can I "kick" a user that is logged on the host? > > > > TIA > > > > > kill -9 `ps -aux | awk '$1 ~/username/ {print $2}'` > I've had trouble killing logins manually that way, although I admit that I've been using a plain 'kill' command, not 'kill -9'. Where I need to do this most often is for SSH users whose sessions time out due to connectivity problems. I kill their processes and shell, but the login still just sits there for a really long time (hours? days? .. in 'who' anyway) before it goes away. Phil -- Philip J. Koenig pjklist@ekahuna.com Electric Kahuna Systems -- Computers & Communications for the New Millenium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message