passwd issues

I have a weird issue, I can't change my password with passwd. It shows that everything went fine but in fact it isn't.

Code:
user@bsd:/home/user % passwd
Changing local password for user
Old Password:
New Password:
Retype New Password:
user@bsd:/home/user %

Do you have any idea why or what should I try?
 
Does the system log /var/log/messages report something about the issue?

Sometimes it happens that the passwd databases become out of synch. For repairing it, you could try:

# pwd_mkdb -p /etc/master.passwd

However, I cannot guarantee, that this fixes your issue.
 
Yep, it worked!

Thank you!

rolfheinrich said:
Does the system log /var/log/messages report something about the issue?

Sometimes it happens that the passwd databases become out of synch. For repairing it, you could try:

# pwd_mkdb -p /etc/master.passwd

However, I cannot guarantee, that this fixes your issue.
 
I have experienced that issue too. However, it was possible to change the root password, but not the one for a normal user (which I use to login remotely). Also, the solution proposed by @rolfheinrich solved the issue: # pwd_mkdb -p /etc/master.passwd. I have to mention that this happened after an upgrade from 9.2 to 10.0 (amd64) -RELEASE and some automated mail from the server stated a database mismatch. I cant find that mail though.
 
Last edited by a moderator:
It happens on 9.2-RELEASE too (two VMs before upgrading one to 10.0-RELEASE and the server still 9.2-RELEASE), maybe a security patch.
 
freethread said:
It happens on 9.2-RELEASE too (two VMs before upgrading one to 10.0-RELEASE and the server still 9.2-RELEASE), maybe a security patch.
Was that on an unpatched 9.2-RELEASE system? I tested it with 9.2-RELEASE-p3/amd64 and cannot reproduce it, so I suspect it was fixed in one of the updates.
 
Unfortunately I don't remember when it happened. I can say from the two last weeks of October 2013 to the first two weeks of November 2013, but I'm not sure. I update FreeBSD as soon as possible with freebsd-update, when I receive the system security mail (weekly check for security patches in cron). Maximum two weeks after the patch is available (one week maximum lost before the mail and I patch systems in the next week).

However if there is a way of knowing when I watched this thread (admins), then that was the period.
 
This happened to me as well. I didn't notice the problem immediately, but I have to figure it was the result of doing a freebsd-update from 9.2-RELEASE to 9.3-RELEASE.

I solved the problem perhaps less elegantly, by going into vipw, modifying a line and then putting it back as it was, and saving. This seems to have had the same result and rebuilt the database.

My mind was completely blown as I would use passwd to change a password, going so far as to cut and paste it so I couldn't possibly be making any errors, then immediately trying to log in with that username and failing. I suppose rebuilding the database is the equivalent of "Did you try turning it off and turning it back on again?".
 
I get the same issue from time to time. Not yet sure what's causing it. It doesn't seem to be related to freebsd-update(8) as it happens on systems that have been running for a while. For some reason the database gets out of sync with passwd.
 
Back
Top