I forgot my Ubuntu password so I booted into recovery and dropped into a root shell prompt and this is what happened:
root@username-PC:~# passwd username
Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged
Also make sure you are mounting the file system read/write.
After immediately selecting 'Drop into root shell prompt' I found the filesystem was mounted read only, which prevents resetting the password.
Choosing the option to remount
/
asread/write
and going back into the root shell prompt enabled the password change.The command to run prior to changing the password is:
mount -rw -o remount /
I'm not sure how it happened. A sudo user created my account then deleted it then created it again.
Here is what I found
No change.
Showed no errors.
Showed no errors.
Looks normal.
Showed user and encrypted password.
Showed nothing. Not sure what that means but doesn't look right.
So the solution was to delete the password then reset new password.
Hope this helps.
I originally posted here Getting an "Authentication token manipulation" error when trying to change my user password but google shows this result first so, I re-posted.
I got this error by changing password with device where date was not set. (ie. it was random after boot)
Basically what happened was that when I changed the password the illegal timestamp got updated to
/etc/shadow
. After that one could not use that account to login or change its password. Even with root account it was impossible to change that password again.To fix the account I had to:
/etc/shadow
file (I used last working shadow file)This error is coming from PAM (Pluggable Authentication Module) which says the module was unable to obtain the new authentication token (check
auth.log
for more details about this error).This is related to your authorization settings found in
/etc/pam.d/
directory (such asminimum_uid
incommon-auth
or some other restrictions requisite marks). So please double check that the settings in PAM module are correct.See:
man pam_chauthtok
Sometimes this error may happen when changing password for a user which didn't have the current password set yet and
passwd
still asks for it, so the workaround is to force the change by addingsudo
, e.g.:sudo passwd $USER
.If you have LikeWise or PowerBroker installed, this will occur for
root
. I was forced to uninstall pbis-open (which i was not using anymore).