1846585 Members
2920 Online
110256 Solutions
New Discussion

listuser

 
SOLVED
Go to solution
Rocky Lavoie_1
Advisor

listuser

Hi All,
When I use listuser command to see users on my HP-UX11 system, I have found a user listed 15 times. She was actually logged in only three times. I have found this twice with different users. WTMP does not show the 15 logins. Any ideas?
Thanks,
Rocky Lavoie
7 REPLIES 7
John Poff
Honored Contributor

Re: listuser

Hi Rocky,

I just checked one of my 11.0 boxes and I don't have a 'listuser' command. I have a 'listusers', but it just prints a pretty list of the users in the /etc/passwd file.

Does your user show up too many times when you use the 'who' command?

JP
Sridhar Bhaskarla
Honored Contributor

Re: listuser

Hi Rocky,

What does your "grep ^user /etc/passwd" gives?.
listusers picks up logins from /etc/passwd.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James R. Ferguson
Acclaimed Contributor

Re: listuser

Hi Rocky:

The 'listusers' command uses the contents of the 'etc/passwd' and '/etc/group' files. The 'var/adm/wtmp' file (when present) holds the last login information.

Was the 'wtmp' file trimmed? Did you provide any options to 'listusers'? It would be helpful to see the input and output of this command.

Regards!

...JRF...
John Dvorchak
Honored Contributor

Re: listuser

If a user is a member of different groups, listusers without the -g switch will list that user as many times as he/she has group memberships. If what you are trying to do is find out who is logged on to the system, you should be using the who command.

man who
man listusers
If it has wheels or a skirt, you can't afford it.
Rocky Lavoie_1
Advisor

Re: listuser

Hi Again,
Thanks for the replies.
The listuser command is from our unidata database. It is supposed to show the number of licenses in use. Thanks
John Poff
Honored Contributor

Re: listuser

Oh well. I don't know anything about Unidata, so I can't help you with that.

I didn't know about the HP-UX 'listusers' command. Now I can go home happy because I learned something new today. Cool! :)

JP
Jeff Schussele
Honored Contributor
Solution

Re: listuser

Hi Rocky,

If this command is to show DB connections & it shows 15 connections from this user's 3 login sessions - then either:

1) This user has terminated abnormally in the past & the "connections" still show up (Could be a user education issue - i.e. exit the application or session properly)
OR
2) This user actually has 15 DB connections, either directly logged in or via applications runing under the user's ID.

I'd check just what processes (ps -uf user_name) this user has currently running.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!