From owner-freebsd-questions Mon Jun 17 18:38:57 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id CF0AD37B43A for ; Mon, 17 Jun 2002 18:38:50 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.12.3/8.12.3) id g5I1ZooT011732; Mon, 17 Jun 2002 20:35:50 -0500 (CDT) (envelope-from dan) Date: Mon, 17 Jun 2002 20:35:50 -0500 From: Dan Nelson To: "Philip J. Koenig" Cc: questions@FreeBSD.ORG Subject: Re: kicking users Message-ID: <20020618013550.GA6214@dan.emsphone.com> References: <20020618004558320.AAA595@empty1.ekahuna.com@pc02.ekahuna.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020618004558320.AAA595@empty1.ekahuna.com@pc02.ekahuna.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i 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 In the last episode (Jun 17), Philip J. Koenig said: > 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. If you kill -9 sshd, it doesn't get a chance to clean up the login records. Try just kill -9'ing the user's shell. You can also force the connections to time out all by themselves by setting net.inet.tcp.always_keepalive=1 in /etc/sysctl.conf. That'll force the kernel to send an empty packet after a TCP socket has been idle for a couple of hours. If the packet isn't acked, the kernel closes the socket. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message