Date: Thu, 29 Apr 1999 09:05:41 -0500 (CDT) From: Mark Tinguely <tinguely@plains.NoDak.edu> To: chrismar@readington.com, dima@unixfreak.org Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ghost user? Message-ID: <199904291405.JAA08406@plains.NoDak.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904291405.JAA08406>