Date: Thu, 16 Dec 2004 21:35:19 +0100 From: Karol Kwiatkowski <freebsd@orchid.homeunix.org> To: freebsd-questions@freebsd.org Subject: Re: user disappears from w and who Message-ID: <41C1F187.1000903@orchid.homeunix.org> In-Reply-To: <6.1.1.1.2.20041216150800.0c54d358@pop.gmail.com> References: <c24ebf7704121608042925212c@mail.gmail.com> <41C1D214.6080605@orchid.homeunix.org> <6.1.1.1.2.20041216150800.0c54d358@pop.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Brandon Lodriguss wrote: > It seems like utmp/wtmp is getting updated when the user logs out of the > second shell, then it ignores the fact that the user is still logged in to > the original shell. I've got curious and investigated a bit. It looks like when user logs in the second time (and it doesn't matter that he logs in as himself) system information gets updated just like the previous session was ended (like user logged off before logging in). I hope that will help someone with further investigation (I'm not familiar with the source). Here's a "proof": (ssh session, notice the time) > login as: joe > Password: > Last login: Thu Dec 16 18:46:02 2004 from name.of.a.box > [...motd...] > joe$ date > Thu Dec 16 20:18:12 CET 2004 > > [...I'm waiting here at least one minute...] > > joe$ login > login: joe > Last login: Thu Dec 16 20:18:00 from name.of.a.box > [...motd...] > joe$ date > Thu Dec 16 20:19:17 CET 2004 > > [...I'm waiting here at least one minute...] > > joe$ exit > joe$ date > Thu Dec 16 20:21:29 CET 2004 as root: > # last joe > joe ttyp0 Thu Dec 16 20:19 - 20:21 (00:02) > joe ttyp0 192.168.1.66 Thu Dec 16 20:18 - 20:19 (00:01) > [...] ^^^^^ last(1) reports user 'joe' logged off the same moment he logged in by typing 'login'. Finishing ssh connection (exit) results with this error in auth.log: > sshd[98620]: syslogin_perform_logout: logout() returned an error Also I tried logging 'joe' as different user second time - it doesn't matter. That's all from me, I hope someone will tell more. Regards, Karol -- Karol Kwiatkowski <freebsd at orchid dot homeunix dot org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41C1F187.1000903>