10

I am in a bizarre situation, that I can't reset user's password on my machine (Ubuntu 16.04) using eighter sudo passwd username or passwd username from the root account.

root@adam-minipc:~ # passwd mikolaj
Current password: 
New password: 
New password (again): 
passwd: Authentication token manipulation error
passwd: password unchanged

In the /etc/shadow the relevant entry reads:

mikolaj:!:18063:0:99999:7:::

Why is that? What cause it and how to reset the password already? Have I been pwned?


Unlocking the account does not help either:

root@adam-minipc:~ # passwd -u mikolaj
passwd: unlocking the password would result in a passwordless account.
You should set a password with usermod -p to unlock the password of this account.

usermod -p <encrypted password> mikolaj requires encrypted password, and it simply pastes it to the /etc/shadow file. I don't know how to get the encrypted password, even if I knew, it must be a way to simply reset a password if you are root. It is the first time I see this behavior of passwd and frankly I am really at lost.


The question is different from Getting an "Authentication token manipulation" error when trying to change my user password, because it has nothing to do with the read-only file system, nor I complain about the error in the first place. I want to know, why sudo passwd <username> suddenly started asking for a current password. On all my other systems it doesn't.

1 Answers1

6

I've finally found the solution, but it does not answer why sudo passwd <username> suddenly started asking for the current password, so I am not going to mark it as a solution.

To solve it run as root usermod -p "" mikolaj, and then change the password using passwd as always, and when it asks you for the current password, simply press enter without typing anything.