Operating System - HP-UX
1827299 Members
2907 Online
109961 Solutions
New Discussion

Re: Password changing as a NIS client.

 
SOLVED
Go to solution
Gadi
Advisor

Password changing as a NIS client.

Hello all,

I have a problem to change user passwd.
The users are trying to change password as NIS clients, when typing passwd in his account, the user get a message:

"Couldn't change passwd/attributes for user".

We tried this too: passwd -r nis user, but we got the same error.

The NIS server is B1000, running 11.11.

Only as root, I can change the user password by typing:

/usr/bin/passwd -r files -F /var/yp/src/passwd username.

What to do for changing the user passwd, as a user?
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: Password changing as a NIS client.

You need to run the yppasswd command rather than passwd on the NIS clients. You can still run the passwd command on the NIS master BUT you must then do a ypmake to rebuild the passwd maps. Yppasswd make a request to the yppasswdd (yppasswd daemom) which updates the passwd maps and the /etc/passwd file on the NIS master.
If it ain't broke, I can fix that.
Hai Nguyen_1
Honored Contributor

Re: Password changing as a NIS client.

Gadi,

Have you tried this command yppasswd which is used to change an NIS password?

Hai
Gadi
Advisor

Re: Password changing as a NIS client.

Yes, I tryed yppasswd too, but it works only on an old NIS server, which is running 10.20.

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Password changing as a NIS client.

Yppasswd should work from any client. You may not have yppasswdd setup properly so that it is not pushing out the changes and updating the maps. I have used yppasswd for many years and it works flawlessly.
If it ain't broke, I can fix that.
Shannon Petry
Honored Contributor

Re: Password changing as a NIS client.

If NIS is setup correctly, then the passwd command issued by a user should invoke yppasswd automagically.

First make sure that your ypservers maps are correct. The master server should be listed first. If not, on the master edit the file "/var/yp/ypservers". this map is only made at ypinit -m phase, so you'll have to manualy make the map like so:
cd /var/yp/"mydomain"
makedbm ../ypservers ypservers
Make sure to transfer this map to slaves if there are any.
Next, remove NIS from the clients, and re-connect them to the domain. Also make sure that nsswitch.conf is setup correctly.

Last, make sure to put the + in passwd and group. I.E.
+::0:0::: or +::-1:-1::: in passwd and +::0: or +::-1: in group.

NOTE: If their is a "+::-1:-1::" in /etc/passwd, local passwd will work, but you will not be able to add local ID's.

Regards,
Shannon
Microsoft. When do you want a virus today?
Hai Nguyen_1
Honored Contributor

Re: Password changing as a NIS client.

Gadi,

yppasswd should be the only command used to modify NIS users' passwords.

Check to see if yppasswd is up and running on the NIS master server.

In addition, check if the /etc/ptmp file exists on the NIS master server. If so, remove it in order for the yppasswdd to function properly and try to change passwd using yppasswd again.

Hai
Sanjay_6
Honored Contributor

Re: Password changing as a NIS client.

Hi,

you should be using yppassed to change the password of a NIS user. The passwd command will try to change the password of the user on the local system only.

Hope this helps.

regds
Gadi
Advisor

Re: Password changing as a NIS client.

Thanks to all,
sorry for the late respond, it was to late, I went home to sleep.

My problem was solved. I get the clue from Clay (thank you Clay).
I changed a line in /etc/rc.config.d/namesvrs in the NIS server, from original line to this line:
YPPASSWDD_OPTINS="/var/yp/src/passwd -m passwd DIR=/var/yp/src".

Now it works fine and the users can change the password.