Operating System - HP-UX
1829025 Members
2172 Online
109986 Solutions
New Discussion

userids in /etc/passwd, but not in sam

 
Robert Hoey
Advisor

userids in /etc/passwd, but not in sam

HP-UX 10.20
All patches installed.

Created a new user. That new user's info is seen in /etc/passwd, but it is not seen in the user listing provided by sam (yes, I did hit Refresh). Has anyone seen this problem?

Other info:
maxusers = 220
more /etc/passwd | wc -l = 191

Thanks in advance.

-Rob
2 REPLIES 2
Jason VanDerMark
Trusted Contributor

Re: userids in /etc/passwd, but not in sam

I have seen this before in the case that the user id listed in the /etc/passwd file was the same as another user who already existed. Sam would only show the first user it ran into with the user id and would ignore the second one. Changing the uid fixed it. Don't know if this helps, but its worth a look.

Good Luck,
Jason V.
Tie two birds together, eventhough they have four wings, they cannot fly.
Dan Hetzel
Honored Contributor

Re: userids in /etc/passwd, but not in sam

Hi Robert,

If 2 or more users share the same UID, sam will only show you the first one, as will all programs using the getpwent() call.

Here is an abstract of the getpwent() manpage:
When first called, getpwent() returns a pointer to the first passwd structure in the password database.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com