Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2001 14:36:47 +1000
From:      Edwin Groothuis <edwin@mavetju.org>
To:        Chris Collins <collins@bsduser.ca>
Cc:        questions@freebsd.org
Subject:   Re: logging out a ghost user
Message-ID:  <20010826143647.B29422@k7.mavetju.org>
In-Reply-To: <20010826002259.W451-100000@bsduser.ca>; from collins@bsduser.ca on Sun, Aug 26, 2001 at 12:30:36AM -0400
References:  <20010826002259.W451-100000@bsduser.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 26, 2001 at 12:30:36AM -0400, Chris Collins wrote:
> Sometimes I will ssh to my BSD machine from work but as expected my
> windows machine at work dies and needs a reboot. I then log back into my
> machine and find that I am still logged in. How do I disconnect or logout
> that session that I did not disconnect from properly before?

With the ps-utility you can an overview of all your processes:
      [~] edwin@mud>ps
	PID  TT  STAT      TIME COMMAND
      57709  p0  Ss     0:00.04 -bash (bash)
      57720  p0  R+     0:00.00 ps
      57713  p1  Ss+    0:00.03 -bash (bash)

As you see, the ps command is invoken from TTY p0, so all the other
processes of me running on something else than p0 are invalid. You
can kill them with "kill PID", for example "kill 57713" or if they
don't want to die "kill -9 57713".

If you're wondering about the output of "who" or "last", that's
only an administrative thing, not a real problem. (well, depending
on who you talk to :-)

Edwin

-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/

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?20010826143647.B29422>