Operating System - HP-UX
1834187 Members
2526 Online
110064 Solutions
New Discussion

duplicate lines in 'last' output

 
Sergey Akifiev_1
Frequent Advisor

duplicate lines in 'last' output

hi
while inspecting output of `last' command we've met some strange duplicating lines. for example:
svista pts/28 Wed Dec 20 13:27 still logged in
svista pts/28 Wed Dec 20 13:19 still logged in

how can user be logged in on same terminals two times?

btw, `w' and co. shows only one login on pts/28 - the first one.
7 REPLIES 7
Maxim Yakimenko
Super Advisor

Re: duplicate lines in 'last' output

Hi,

May be user, who logged from pts/28, started another login process and this fact was registered? What applications this user started?
James R. Ferguson
Acclaimed Contributor

Re: duplicate lines in 'last' output

Hi:

This behavior is not unexpected, particularly if a connection is severed abnormally (for exmaple, a user reboots a PC-based connection).

The login database represented by '/var/adm/wtmp' needs to be updated when a login begins and when it ends. Without a record of a session termination, the deduction is that the user is "still logged in".

Regards!

...JRF...
George Liu_4
Trusted Contributor

Re: duplicate lines in 'last' output

run ps to confirm if there are two connections. It seems normal to me.
spex
Honored Contributor

Re: duplicate lines in 'last' output

Hi,

Please see fwtmp(1M).

PCS
MarkSyder
Honored Contributor

Re: duplicate lines in 'last' output

I don't see anything unusual in this. If the user is using a GUI (s)he may have more than one window open, in which case each window will show up as a session in last.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Sergey Akifiev_1
Frequent Advisor

Re: duplicate lines in 'last' output

is it normal to have two 'logged in' records with _single_ pts concurrently?
spex
Honored Contributor

Re: duplicate lines in 'last' output

Hi,

I wouldn't say that it's "normal", but it's certainly not uncommon. Your /var/adm/wtmp database is a little corrupt. Not a big deal.

Clobber the file with '> /var/adm/wtmp' to reset. Otherwise, if you feel like repairing it, see this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1070468

PCS