1833777 Members
2033 Online
110063 Solutions
New Discussion

Re: Cant Change Passwd

 
Peter_17
Frequent Advisor

Cant Change Passwd

All,

I'm in a NIS envionment and for some reason, am no longer able to change passwords using passwd, or yppasswd commands. This has worked in the past, but came in today and it was defunt. Returns with the following error:

[user1@a_server]% passwd
Changing password for user1
Changing NIS password for user 'user1'
Old password:
New password:
Re-enter new password:
yppasswd: attempting to change password on NIS master a_server
yppasswd: couldn't change NIS password for 'user1'--problem with NIS maps on server a_server
[user1@a_server]%

Like I said, this worked a couple days ago, but not now. I can manually vi the passwd file and make it and it works, I just cant change using passwd or yppasswd anymore.. Arghh!

Any and all help appreciated.

PEte
16 REPLIES 16
Patrick Wallek
Honored Contributor

Re: Cant Change Passwd

Have the permissions changed, or has anything else changed on your NIS server? Something had to have changed somewhere along the lines, it'll just be a matter of figuring out what.
A. Clay Stephenson
Acclaimed Contributor

Re: Cant Change Passwd

Hi Peter,

I'm surprised that you are trying to change a passwd using vi. My first cut at this would be to login as root on the NIS server and do a pwck. If the passwd file itself is corrupt then that could cause all your problems. If pwck reports that all is well, I would issue a passwd command on the NIS server. If that is ok, cd to /var/yp and do a make. You should then see any errors that remain.

Clay
If it ain't broke, I can fix that.
Peter_17
Frequent Advisor

Re: Cant Change Passwd

Looking through old backups, permissions / ownership of the password map / file is the same as when it used to work (last week). Any other thoughts?? AFAIK, nothing has 'intentionally' changed over the last few days... (no patches, upgrades, etc...)

Thanks,

Pete
Peter_17
Frequent Advisor

Re: Cant Change Passwd

My vi on the passwd file (/var/yp/src/passwd) was simply to temporarily remove my passwd so there is a change, so I can run make (make doesn't run if there is no change from the current), which was simply a test to see if it was able to run make, and it was, revealing no errors. Running pwck doesn't reveal much, (a couple locked accounts with no home dirs, which is the norm here), and nothing more...

The machine I'm on, (the NIS Master) was just rebooted in an attempt to clear the problem, but that yeilded neg results as well..

Any thoughts appreciated.
Patrick Wallek
Honored Contributor

Re: Cant Change Passwd

Are you trying to execute passwd or yppasswd on the NIS server or an NIS client? If on the client, have you tried stopping and restarting the NIS client daemons (/sbin/init.d/nis.client stop and then start)?

If you haven't tried it on the server, can you give it a shot and let us know what happens?
linuxfan
Honored Contributor

Re: Cant Change Passwd

Hi Peter,

Did you try the "ypmake" rather than the "make"?
Is NIS ok in other aspects, i mean other than this problem, does everything seem ok? Also is the rpc.yppasswd daemon running?

Since you are trying this on the NIS server anyway, did you try "passwd -r files"

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Peter_17
Frequent Advisor

Re: Cant Change Passwd

Patrick,

I've tried passwd and yppasswd on both the NIS Master, and several clients; all failing with the same error message. Also, all other NIS functionallity seems to be running as per normal.

Ramesh,

Not sure about your -r files passwd switch. Man passwd (yppasswd) doesn't list that as valid on my 10.20 box. (It does on my Sun box though...) Also, the rpc.yppasswdd daemon is running.

Further thoughts appreciated!

Thanks,

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Cant Change Passwd

If passwd is failing on the NIS master then you do not have a yp problem but rather a problem with passwd itself. Again, do a pwck and that should pinpoint the problem. Passwd knows nothing about the yp side of the world.
Just so we are not overlooking the obvious, do a bdf and make sure that we are not dealing with full filesystems.
If it ain't broke, I can fix that.
linuxfan
Honored Contributor

Re: Cant Change Passwd

Hi Peter,


The errors are indicating a problem with the NIS maps.

1. Did you run /usr/sbin/pwck

2. touch your password file
"touch /etc/passwd "
3. and then run ypmake
"/var/run/ypmake"

Do you see any errors when you run ypmake?

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Peter_17
Frequent Advisor

Re: Cant Change Passwd

pwck (on /etc/passwd) revealed the folloing:

-uus:*:-24:-24:::
Invalid UID
Invalid GID

+::-24:-24:::
Invalid UID
Invalid GID

However, I'm unsure of how to interpret this...

Could this be the culprit?

(before i did pwck on the /var/yp/src/passwd file)

As far as disk being full.. negative.. lots of space avail...

Your thoughts on the pwck results appreciated...

Pete

Peter_17
Frequent Advisor

Re: Cant Change Passwd

...also, touching /etc/passwd and running /var/yp/ypmake revealed no errors with the command completing with the message:

ypmake complete: no errors encountered.

pete
linuxfan
Honored Contributor

Re: Cant Change Passwd

Hi Peter,


Looks like you are using the passwd file /var/yp/src/passwd for the NIS maps, in which case do

touch /var/yp/src/passwd
/var/yp/ypmake

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
A. Clay Stephenson
Acclaimed Contributor

Re: Cant Change Passwd

I see that you do things a little bit diffrently from the typical. On the NIS server, I almost always set PWFILE to /etc/passwd and have no '+' entries on the master. That makes the passwd command behave normally. In your case, to change a passwd when you don't know the passwd, you have to do a passwd -F /var/yp/src/passwd user and then do the ypmake. Normally the only negative uid is -2 group -24 for the NFS nobody entry.
If it ain't broke, I can fix that.
Peter_17
Frequent Advisor

Re: Cant Change Passwd

I've removed the -uus entry from /etc/password and also changed the "-24" to "0" on the last line. I run pwck and it now comes back with no errors, however, I still cannot run passwd or yppasswd....

Pete
Mark Vollmers
Esteemed Contributor

Re: Cant Change Passwd

Peter,

It could be that the passwd command got corrupted somehow. Grab a backup tape from when it worked and pull off the /etc/passwd command (rename the current just to be safe). Maybe that will fix things. Maybe not, but it's a thought.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Peter_17
Frequent Advisor

Re: Cant Change Passwd

OK, I figured it out... firstly, Thanks to all who replied... at minimum, It was a learning experience. Anyway, the problem was the result of a in-house version of yppasswdd which generates two apparent lock files (the file names would not lead one to belive they are actual lock files) in two different locations. Once I removed the files and restarted inetd (inetd -c), all worked fine... Arghh! The error message from passwd/yppasswd sure didn't help steer me in the right direction.... Oh well, live and learn.

Once again, thanks for all your feedback on this issue...

Pete