user is not logger in, but who claims something else

Dan Nelson dnelson at allantgroup.com
Tue Jun 29 09:51:54 PDT 2004


In the last episode (Jun 29), Piotr Gnyp said:
> discordia# ps -auwx | grep diabeu
> discordia#
> 
> discordia# w
> 18:37  up 8 days,  5:54, 9 users, load averages: 0,03 0,05 0,02
> USER             TTY      FROM              LOGIN@  IDLE WHAT
> toread           p0       chello0621790851 18:26       - pine -i
> diabeu           po       213.134.140.150: 17:42      46 -
> diabeu           pp       213.134.140.150: 15:15    3:13 -
> diabeu           pt       213.134.140.150: 15:01    3:12 -
> diabeu           pu       213.134.140.150: 15:25    3:11 -

w looks at the contents of /var/run/utmp, and if the user's login
process dies unexpectedly then it doesn't clear the entry out of utmp. 
The next login to use that particular pty will overwrite the stale
entry.

Rebooting will fix it (of course), as will logging in a bunch of times
or running enough screen sessions that ttyp[optu] are reused.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list