Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2001 13:35:10 -0500
From:      Daniel Frazier <dfrazier@magpage.com>
To:        Jonathan Hilgeman <JHilgeman@ecx.com>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Log Out Other Users
Message-ID:  <3BFBF3DE.3060306@magpage.com>
References:  <5D90F61EB6FDD411836500508B137F1AA3F06C@mailsvr.ecx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Hilgeman wrote:

> When I type "who" I get a list of about 4 users who are logged in via SSH. I
> know some of them are old sessions that just timed out or something, so I
> find the PIDs of the SSH processes, and kill those PIDs. However, sometimes
> this doesn't do the trick. They disappear entirely from the process list,
> but they continue to show up when I type who. Is there a better way to kill
> users?
> 
> - Jonathan
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

"shutdown -k" might do the trick, although this will result in all
logins (except root) being disabled.  "rm /var/run/nologin" will fix
that.  You also might want to look at /usr/ports/sysutils/slay.  This
will kick off a user and terminate any of that users' processes.  I
think it will only work on one user at a time, though...

-- 
----------------------------------------------------------------------
Daniel Frazier  <dfrazier@magpage.com>   Tel:  302-239-5900 Ext. 231
Systems Administrator                    Fax:  302-239-3909
MAGPAGE, We Power the Internet           WWW:  http://www.magpage.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
         - Benjamin Franklin, Historical Review of Pennsylvania, 1759.



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?3BFBF3DE.3060306>