Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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!