Operating System - HP-UX
1748219 Members
4623 Online
108759 Solutions
New Discussion юеВ

Re: Changing NIS when PWFILE=/etc/passwd.master

 
SOLVED
Go to solution
Andrew F Greenwood
Occasional Advisor

Changing NIS when PWFILE=/etc/passwd.master

I understand that yppasswd requires the old password, so the correct thing to do is to use passwd and then ypmake.

However, I have an alternate password file. The command "passwd -r files -F /etc/passwd.master " gives "Invalid login name.".

In SAM the NIS Users is not a complete list either. Am I missing a trick?
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: Changing NIS when PWFILE=/etc/passwd.master

Are you running this on your NIS master, on the actual master text password file ? On my NIS master server I'm able to do so. My master password file sits in /etc/ypfiles, for me it's run like so ..
# passwd -r files -F /etc/ypfiles/passwd
and it does not give me any error, it prompted for the new password.
Andrew F Greenwood
Occasional Advisor

Re: Changing NIS when PWFILE=/etc/passwd.master

Yes, I have the error on the master server.

When you are in SAM, do you see the full file? When prompted, I entered the name of the alternate passwd file and that I wanted it to use ypmake:

root@uk204:/> grep nis /var/sam/preferences/app_preference
ug_nis_pwd_file:/etc/passwd.master
ug_nis_map_cmd:ypmake
and yet SAM doesn't look right. I do have some entries from passwd.master that aren't in passwd, but only a few.

FYI, I am running in compat mode for passwd lookups, and I have the HP recommended escape in the /etc/passwd file. Some of my uids are high, i.e. 10300.
Andrew F Greenwood
Occasional Advisor

Re: Changing NIS when PWFILE=/etc/passwd.master

I just successfully tried "passwd -r files -R /etc/passwd.master dictboss", which is one of the IDs that I can see in SAM#s NIS Users.

I guess the passwd problem is just a symptom.

Any idea why my NIS Users lit is incomplete?
S.K. Chan
Honored Contributor
Solution

Re: Changing NIS when PWFILE=/etc/passwd.master

My SAM's fine. It shows all my NIS users. From my experience SAM is darn fussy when it comes to getting the information from the password file. You see all kind of inconsistent (only in SAM) if your password file is not clean (eg: missing field, etc, etc). I suggest one thing .. run pwck on /etc/passwd.master just to be sure ..
# pwck /etc/passwd.master
Any "suspicious" error ?
Andrew F Greenwood
Occasional Advisor

Re: Changing NIS when PWFILE=/etc/passwd.master

Oh dear.

I had run a pwck on the file beforehand, but in amongst the sea of messages about login directories and optional shells not being found, there was one about an invalid (null) GID that I had simply missed.

The NIS Users list is now complete, and the passwd command is working just as it should.

Thanks for your help!