Date: Mon, 17 Jun 2002 20:35:50 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: "Philip J. Koenig" <pjklist@ekahuna.com> Cc: questions@FreeBSD.ORG Subject: Re: kicking users Message-ID: <20020618013550.GA6214@dan.emsphone.com> In-Reply-To: <20020618004558320.AAA595@empty1.ekahuna.com@pc02.ekahuna.com> References: <bulk.5761.20020617130317@hub.freebsd.org> <20020618004558320.AAA595@empty1.ekahuna.com@pc02.ekahuna.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020618013550.GA6214>