user disappears from w and who

Karol Kwiatkowski freebsd at orchid.homeunix.org
Thu Dec 16 12:35:43 PST 2004


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>


More information about the freebsd-questions mailing list