Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2002 18:24:58 +0000
From:      Jez Hancock <jez.hancock@munk.nu>
To:        FreeBSD questions List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: user dead but appears still logged in in 'w' output
Message-ID:  <20021104182458.GC2434@users.munk.nu>
In-Reply-To: <3DC695EA.38ECEB6B@ene.asda.gr>
References:  <20021104113544.GB1080@users.munk.nu> <20021104145433.GA755@rucus.ru.ac.za> <3DC695EA.38ECEB6B@ene.asda.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 04, 2002 at 05:44:42PM +0200, Lefteris Tsintjelis wrote:
> David Sieb?rger wrote:
> > 
> > On Mon 2002-11-04 (11:35), Jez Hancock wrote:
> > > > I have a problem with a user who was idle for a long period
> > > > of time which I killed off by terminating the associated
> > > > login process for that user's ssh connection.  However
> > > > that user still appears in the output from 'w'.
> > > >
> > > > How can I remove the user from 'w' output?
> > > Ok, I've just logged in multiple times on a ttyp until I logged
> > > in on the tty occupied by the ghost and the w entry was removed.
> > > (The user was logged in on ttyp2, so I logged in on ttyp0, p1 and
> > > then on logging in on p2 the ghost was removed).
> > >
> > > Is there an easier way?
> > 
> > Send the user's shell a SIGHUP and (in most cases) it'll cleanly log
> > itself out.
> 
> Something similar to that happened to me some time ago and there were no
> running processes by that user at all, just normal system processes. I
> think it might had to do with u/wtmp. Is there a way to clean such
> entries from u/wtmp?
The only way I found (as mentioned above):
> > > > How can I remove the user from 'w' output?
> > > Ok, I've just logged in multiple times on a ttyp until I logged
> > > in on the tty occupied by the ghost and the w entry was removed.
> > > (The user was logged in on ttyp2, so I logged in on ttyp0, p1 and
> > > then on logging in on p2 the ghost was removed).
> > >
> > > Is there an easier way?
Still, a nice tool to kill user's from the system would be nice.
A mate of mine created a tool called 'bish' to cleanly kick user's from a
system, I should see if he wants to include it in the ports, it works
quite well.

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?20021104182458.GC2434>