root cannot use passwd command to change NIS password
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
root cannot use passwd command to change NIS password
As root on the NIS Server machine, trying to change an NIS user's password using the passwd command fails with:
NIS password could not be changed.
passwd: Failed preliminary check by password service
Using the yppasswd command succeeds, but according to the man page, this is deprecated in favor of the regular passwd command.
Logs show the following:
passwd: pam_unix(passwd:chauthtok) : password not changed for user on server
rpc.yppasswdd[3467]: update user (uid=20053) from host <ipaddr> rejected
rpc.yppasswdd[3467]: Invalid password
I can change the password as the user himself, but not as root.
Can anyone help solve this problem?
As root on the NIS Server machine, trying to change an NIS user's password using the passwd command fails with:
NIS password could not be changed.
passwd: Failed preliminary check by password service
Using the yppasswd command succeeds, but according to the man page, this is deprecated in favor of the regular passwd command.
Logs show the following:
passwd: pam_unix(passwd:chauthtok) : password not changed for user on server
rpc.yppasswdd[3467]: update user (uid=20053) from host <ipaddr> rejected
rpc.yppasswdd[3467]: Invalid password
I can change the password as the user himself, but not as root.
Can anyone help solve this problem?
Thanks,
Moshe
I don't know the reason - but, I am guessing it is something in the way in which PAM is configured. But, if you can "change the password as the user himself" - then why not -->
1. su to the user
2. change the password as that user
3. exit back to root.
Maybe I am missing something?
dave,
when run as the user, passwd prompts for the user's current password, which the admin does not have. when run as root, current password is not needed. This is also the behaviour we are used to on our Solaris nis server. yppasswd does work however, so that could be a workaround (but it prompts for the root password first).
reuti,
when run as the user, passwd does indeed make the change on the NIS master (thru the yppasswdd daemon). That's why I expect it to work as root also. unfortunately, it does not.
Maybe it has to do with the fact that I do not keep the NIS passwd file in /etc, but in another dir. Also, I am not using shadow passwords for NIS. Everything else is working fine though (make succeeds, login authentication is OK).
But root can’t be authorized via yppasswd hence it’s denied I think. For me passwd on the headnode detects that it’s local and makes direct changes and runs the make command to rebuild the tables. What is in /etc/yp.conf?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.