Operating System - HP-UX
1826580 Members
3852 Online
109695 Solutions
New Discussion

Re: getprpw does not find files

 
Gord Moore
Frequent Advisor

getprpw does not find files

I am using a trusted system and NIS+ on an MC/Serviceguard cluster under HP-UX 11.11.

This is something that has just started happening. getprpw cannot find something -- I assume it is the trusted files, but (for example) /tcb/files/auth/a/adm does exist. This happens with any user account, and even with accounts that don't exist.

[root] /etc> /usr/lbin/getprpw adm
/usr/lbin/getprpw: GOA1: not found
/usr/lbin/getprpw[2]: HRTEAM1: not found
/usr/lbin/getprpw[3]: TestDie: not found
/usr/lbin/getprpw[4]: aadac1: not found
/usr/lbin/getprpw[5]: aadlid: not found
/usr/lbin/getprpw[6]: aadlid9: not found
/usr/lbin/getprpw[7]: acsrcd: not found
/usr/lbin/getprpw[8]: adcorp: not found
/usr/lbin/getprpw[9]: adcorp9: not found
/usr/lbin/getprpw[10]: adlad: not found
/usr/lbin/getprpw[11]: adlad9: not found
/usr/lbin/getprpw[12]: adm: not found
/usr/lbin/getprpw[13]: aecdid: not found
/usr/lbin/getprpw[14]: aenvcas: not found
:
:
and it always stops at [180] and just sits there which is about 2/3 of the way through the users.

[root] /etc> ll /tcb/files/auth/a/adm
-rw-rw-r-- 1 root root 147 Jan 26 2004 /tcb/files/auth/a/adm

My /etc/nsswitch.conf has this for passwd
passwd: files [NOTFOUND=continue] nisplus

This is on the NIS+ master. On a replica master, there is no problem listing any user. If I enter a non-existant user I get the expected error:
[root] /root> /usr/lbin/getprpw dummy
user password file not found: dummy



What is getprpw not finding? Has anyone any clue?

Thanks.
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: getprpw does not find files

Hi:

First, run getprpw() for a single user and examine the return status. See the manpages for the values and their meanings.

Then, check '/etc/nsswitch.conf'. You might want to specify "return" explicitly on anything other than "success".

Regards!

...JRF...
Gord Moore
Frequent Advisor

Re: getprpw does not find files

I try to run getprpw for a single user and get the output I included. There are consistently 180 /usr/lbin/getprpw[xxx]: : not found errors listed, then it hangs. Control-C is the only way to get out. So the getprpw never finishes.

I changed nsswitch.conf to this:
passwd: files [NOTFOUND=continue] nisplus [NOTFOUND=return]

No change to the behaviour.

What NIS+ commands can I use to compare the Master and the Replica? The getprpw command works on the Replica.

morganelan
Trusted Contributor

Re: getprpw does not find files

Darrel Louis
Honored Contributor

Re: getprpw does not find files

Hi,

What are the permissions on /etc/nsswitch.conf (should be 444)

When you run pwck, do you see any errors?

GL

Darrel
Gord Moore
Frequent Advisor

Re: getprpw does not find files

Darrell,

This is the output of pwck.

[root] /root> pwck

webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false
Login directory not found

smbnull:*:101:102:DO NOT USE OR DELETE - needed by Samba:/home/smbnull:/sbin/sh
Login directory not found

Not exactly sure what that means.

The file /etc/nsswitch.conf is set to 444.


To morganelan, thanks for the pointer. I'll have a look at it and see if it helps.

Denver Osborn
Honored Contributor

Re: getprpw does not find files

Could it be someone ran vipw to add users but forgot to run pwconv to update the prpw db?

Have you tried pwconv?

-denver
Denver Osborn
Honored Contributor

Re: getprpw does not find files

also, for local accounts such as "adm" that you're checking, try getprpw w/ -l to specify local account and skip the nsswitch.conf

getprpw -l adm

-denver
Gord Moore
Frequent Advisor

Re: getprpw does not find files

Well here you go ...

Using pwck didn't show any significant errors, but in digging a little deeper I found that there is a command authck.

/root> authck -a
aquresh1 not listed in /etc/passwd nor the Nis+ passwd table, but is in the Pro
tected Password database.
arcpsc1 not listed in /etc/passwd nor the Nis+ passwd table, but is in the Prot
ected Password database.
afss9 not listed in /etc/passwd nor the Nis+ passwd table, but is in the Protec
ted Password database.
agfsid9 not listed in /etc/passwd nor the Nis+ passwd table, but is in the Prot
ected Password database.
... and the list goes on.

These users should have entries in the Nis+ passwd table, but they are not there. Other users are there (like my account) so they can log on. How these users got "removed" I am not sure.

And how do I get them into the passwd table?


Gord Moore
Frequent Advisor

Re: getprpw does not find files

Ok. That's not the answer.

After digging a little deeper I find that the user ids listed in authck actually were deleted. Their files were not deleted from /tcb/files/auth/x/xuserid. I don't know if there is a bug in SAM or it is an expected behaviour. Anyway, moving the files away from /tcb/files/auth didn't help the original problem.

getprpw will not run. It lists a bunch of users (some have been deleted, some are active and have entries in passwd.org_dir)




> /usr/lbin/getprpw -l gmoore1
/usr/lbin/getprpw: GOA1: not found
/usr/lbin/getprpw[2]: HRTEAM1: not found
/usr/lbin/getprpw[3]: TestDie: not found
/usr/lbin/getprpw[4]: aadac1: not found
/usr/lbin/getprpw[5]: aadlid: not found
/usr/lbin/getprpw[6]: aadlid9: not found

It hangs at error [180].