LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-15-2011, 10:39 AM   #1
thelinz
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
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?

Thanks,
Moshe
 
Old 11-16-2011, 12:05 AM   #2
davemguru
Member
 
Registered: Apr 2006
Location: London
Distribution: Pclos,Debian,Puppy,Fedora
Posts: 87

Rep: Reputation: 40
work around

Quote:
Originally Posted by thelinz View Post
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?
 
Old 11-16-2011, 05:18 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
Shouldn’t passwd detect that it’s a local change anyway. I.e. perform a usual passwd and run make -C /var/yp to rebuild the tables afterwards?

If the user changes his own password: does it say that it was changed at the NIS server?
 
Old 11-16-2011, 09:13 AM   #4
thelinz
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
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).

Moshe
 
Old 11-16-2011, 01:25 PM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
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?
 
  


Reply

Tags
centos, nis, passwd, root


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I cant change my password with the passwd command errigour Linux - Software 3 12-15-2010 04:17 AM
Cant Change NIS Passwd From client Ashish Sood Linux - General 2 06-02-2010 03:24 PM
trying to change root password with the passwd command he04798 Red Hat 5 01-17-2010 11:01 AM
Root password locked by # passwd -l root command kalyantalukdar Linux - Server 4 09-16-2009 12:23 PM


All times are GMT -5. The time now is 07:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration