user dead but appears still logged in in 'w' output

2002-11-04 Thread Jez Hancock
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?

I've just installed 'idled' so hopefully it won't happen
in future ;)

Thanks in advance,
Jez

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



user dead but appears still logged in in 'w' output

2002-11-04 Thread Jez Hancock
 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?


 I've just installed 'idled' so hopefully it won't happen
 in future ;)
Maybe this is the 'easier' way eh?  We shall see

Cheers anyway,
Jez

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: user dead but appears still logged in in 'w' output

2002-11-04 Thread David Siebörger
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.


-- 
David Siebörger
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: user dead but appears still logged in in 'w' output

2002-11-04 Thread Jez Hancock
On Mon, Nov 04, 2002 at 07:34:49AM -0500, david wrote:
 On Monday 04 November 2002 06:31, 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.  
 
 Try would also have a shell session going, kill that as well.
Well, what I actually did was find out the login shell session pid
belonging to the user in question and 'kill -9' that proc  - after 
this the rest of the processes spawned by
the login did all die as well.  Unfortunately the user still appeared
to be logged in in 'w' output.  Whether you can class it as a 'bug' or
not I don't know, since killing a user's login shell isn't the de facto
method of forcefully logging a user out (or is it!?;)

I've been running idled all day though and it seems to be keeping things
tidy, nice utility.

cheers,
Jez

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: user dead but appears still logged in in 'w' output

2002-11-04 Thread Jez Hancock
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 [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: user dead but appears still logged in in 'w' output

2002-11-04 Thread Ruben de Groot
On Mon, Nov 04, 2002 at 06:00:06PM +, Jez Hancock typed:
 On Mon, Nov 04, 2002 at 07:34:49AM -0500, david wrote:
  On Monday 04 November 2002 06:31, 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.  
  
  Try would also have a shell session going, kill that as well.
 Well, what I actually did was find out the login shell session pid
 belonging to the user in question and 'kill -9' that proc  - after 
 this the rest of the processes spawned by
 the login did all die as well.  Unfortunately the user still appeared
 to be logged in in 'w' output.  Whether you can class it as a 'bug' or
 not I don't know, since killing a user's login shell isn't the de facto
 method of forcefully logging a user out (or is it!?;)

Don't use 'kill -9'. That signal is meant for desperate people. Use plain 
kill (-15) and a wellbehaving process will neatly close all administration,
including wtmp.

 
 I've been running idled all day though and it seems to be keeping things
 tidy, nice utility.
 
 cheers,
 Jez
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: user dead but appears still logged in in 'w' output

2002-11-04 Thread Jez Hancock
On Mon, Nov 04, 2002 at 08:16:30PM +0100, Ruben de Groot wrote:
 On Mon, Nov 04, 2002 at 06:00:06PM +, Jez Hancock typed:
  On Mon, Nov 04, 2002 at 07:34:49AM -0500, david wrote:
   On Monday 04 November 2002 06:31, 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.  
   
   Try would also have a shell session going, kill that as well.
  Well, what I actually did was find out the login shell session pid
  belonging to the user in question and 'kill -9' that proc  - after 
  this the rest of the processes spawned by
  the login did all die as well.  Unfortunately the user still appeared
  to be logged in in 'w' output.  Whether you can class it as a 'bug' or
  not I don't know, since killing a user's login shell isn't the de facto
  method of forcefully logging a user out (or is it!?;)
 
 Don't use 'kill -9'. That signal is meant for desperate people. Use plain 
 kill (-15) and a wellbehaving process will neatly close all administration,
 including wtmp.
Cheers, that's probably what caused the problem ;)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message