Ubuntu: Authentication token manipulation error
Channel: Roel Van de Paar
Date: 2019-06-14

Ubuntu: Authentication token manipulation error


Question: 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

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 13 people ==
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
mount -o remount,rw /
passwd
passwd: Authentication token manipulation error
No change.
sudo pwck
Showed no errors.
sudo grpck
Showed no errors.
ls -l /etc/passwd /etc/group /etc/shadow /etc/shadow-
-rw-r--r-- 1 root root 767 May 7 16:45 /etc/group
-rw-r--r-- 1 root root 1380 May 7 16:45 /etc/passwd
-rw-r----- 1 root shadow 1025 May 8 09:11 /etc/shadow
-rw------- 1 root root 1025 May 7 16:46 /etc/shadow-
Looks normal.
sudo cat /etc/shadow |grep oracle
oracle:
$6$FsPqyplr$DrIvjFDSx0ipHmECMw1AU5hTrbNMnnkGRdFlaQcM.p3Rdu2OLjY20tzUTW61HlFH16cal56rKlLuW4j2mK9D.:
15833:0:99999:7:::
Showed user and encrypted password.
sudo cat /etc/shadow- |grep oracle
Showed nothing. Not sure what that means but doesn't look right.
sudo passwd -d oracle
passwd
So the solution was to delete the password then reset new password.
Hope this helps.
I originally posted here https://askubuntu.com/questions/57620/getting-an-
authentication-token-manipulation-error-when-trying-to-change-my-us but google
shows this result first so, I re-posted.

== This solution helped 181 people ==
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 / as read/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 /

== This solution helped 4 people ==
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 as minimum_uid_in_common-auth or some other restrictions requisite
marks). So please double check that the settings in PAM module are correct.
See: man_pam_chauthtok
     PAM_AUTHTOK_ERR: A module was unable to obtain the new authentication
     token.
----
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 adding sudo, e.g.: sudo passwd $USER.

With thanks & praise to God! With thanks to all the many who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music & music license: https://www.bensound.com/royalty-free-music | Images & images license: https://stocksnap.io/license and others | With thanks to user zache (https://askubuntu.com/users/51603), user Yi Jiang (https://askubuntu.com/users/2816), user kenorb (https://askubuntu.com/users/78223), user era878 (https://askubuntu.com/users/11902), user Brandon (https://askubuntu.com/users/40434), user Braiam (https://askubuntu.com/users/169736), user Bernard (https://askubuntu.com/users/156779), and the Stack Exchange Network (http://stackoverflow.com/questions/91188). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.