From owner-freebsd-questions Thu Apr 29 7: 5:54 1999 Delivered-To: freebsd-questions@freebsd.org Received: from plains.NoDak.edu (plains.NoDak.edu [134.129.111.64]) by hub.freebsd.org (Postfix) with ESMTP id B1CF315861 for ; Thu, 29 Apr 1999 07:05:52 -0700 (PDT) (envelope-from tinguely@plains.NoDak.edu) Received: (from tinguely@localhost) by plains.NoDak.edu (8.8.8/8.8.8) id JAA08406; Thu, 29 Apr 1999 09:05:41 -0500 (CDT) Date: Thu, 29 Apr 1999 09:05:41 -0500 (CDT) From: Mark Tinguely Message-Id: <199904291405.JAA08406@plains.NoDak.edu> To: chrismar@readington.com, dima@unixfreak.org Subject: Re: ghost user? Cc: freebsd-questions@FreeBSD.ORG Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 28 Apr 1999, Dima Dorfman wrote: > hi, today, when i did a w(1), i noticed that i have a user logged on, but > they aren't running anything. for example: > > geoffrey ph localhost 6:38PM 26 - > > that is part of the w(1) output. when i do ``ps ajfxU geoffrey'', ps > reports that they aren't running anything. > > why does this happen? and how can i log them out? usually, to log out a > user, i would kill their shell, but they aren't running a shell! sometimes an entry doesn't get removed from the utmp. ftp://ftp.cs.ndsu.NoDak.edu/freebsd/misc/rmutmp.c.gz is a program you can compile and run with the arguements: # rmutmp accountName tty to remove these entries. there is another source file (rmwtmp.c.gz) to remove login entries from the /var/log/wtmp file. This removes evidence of a login. If you wish to "log someone out", then you ADD another utmp entry into the ** /var/log/wtmp ** file with an updated date (or better just use the libutil routine "logwtmp" as in logwtmp(ttyname, "", ""); ). *** FreeBSD 3.x users *** The UT_NAMESIZE has increased between releases of FreeBSD-2.x and FreeBSD-3.x. These programs will need to be recompiled if originally compiled on a FreeBSD-2.x system. --mark tinguely. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message