Operating System - HP-UX
1833817 Members
2643 Online
110063 Solutions
New Discussion

"who" command shows people not actually logged in.

 
SOLVED
Go to solution
Kris Banister_1
New Member

"who" command shows people not actually logged in.

I have an HP-UX 11.11 machine that is acting funny.

When I issue the "who" command (and I just had to reboot the machine) it lists people that are not connected to the machine. It shows them all as accessing the machine thru pts/ta.

Any ideas as to what is going on here?
4 REPLIES 4
Ted Ellis_2
Honored Contributor

Re: "who" command shows people not actually logged in.

who will normally read the contents of the /etc/utmp file.... check the contents of that file... does it show all of these phantom users?

run this command to see the contents:

strings /etc/utmp

Ted
Michael Steele_2
Honored Contributor
Solution

Re: "who" command shows people not actually logged in.

This will be corrupted wtmp and/or utmp files. You can go through SAM, routine tasks, trim system files, or you can 'cat /dev/null > /var/adm/wtmp' from the command line.

# cat /dev/null > /var/adm/wtmp

I kinda of like using SAM for this. It's about the only time I ever use SAM. Other system logs can be trimmed at the same time.

Test wtmp and utmp with 'last' and 'finger'.

# last id / account / user
Support Fatherhood - Stop Family Law
Keith Bevan_1
Trusted Contributor

Re: "who" command shows people not actually logged in.

Hi,

Sounds like a corrupt wtmp file.

You can use sam to trim this file to zero, but users will need to be off the system as the file will be in use. Alternatively you can use sam to trim it to a new temporary file.

The easiest solution is to copy a null file over the top of it. eg

cp /dev/null /var/adm/wtmp

This will empty the fileand should clear the problem.

Hope this helps.

Keith
You are either part of the solution or part of the problem
Steven E. Protter
Exalted Contributor

Re: "who" command shows people not actually logged in.

Try who -R

Clean out and check permissions on wtmp

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com