Ubuntu: Getting an "Authentication token manipulation" error when trying to change my user password
Channel: Roel Van de Paar
Date: 2019-06-13

Ubuntu: Getting an "Authentication token manipulation" error when trying to change my user password


Question: I am logging in to my Ubuntu Server using my username. Once I am logged in I am
typing passwd command. Entering a new password but a second after getting
following error messages:
passwd: Authentication token manipulation error
passwd: password unchanged
What is wrong here? How can I change my password otherwise if I don't have
access to that server physically, i.e. I am connecting remotely with ssh using
terminal.

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

== This solution helped 1 person ==
Also, ensure that your entry in /etc/passwd is not mal-formed. If you have the
incorrect number of colons in the line for your user entry, the 'passwd'
command cannot parse it and refuses to continue with the exact error message
provided.

== This solution helped 1 person ==
This issue occurred due to the incorrect permissions set to /usr/bin/passwd.
Please try to set the permission as 4511 by using the command:
chmod 4511 /usr/bin/passwd
This will resolve the issue.

== This solution helped 2 people ==
Another problem might be that the disk is full. I got this error when resetting
a password, and later checked my disks with df and found that no space is
available on my disk. After freeing some I could reset the password without
problems.

== This solution helped 2 people ==
If you are using SELinux, running this command fixed the issue for me.
restorecon -v /etc/shadow
Thanks to http://www.linuxforums.org/forum/red-hat-fedora-linux/190570-fc17-
x86_64-etc-shadow-problem.html for the solution.

== This solution helped 2 people ==
Check if you have messed up the common-password file in /etc/pam.d/. This will
cause errors if your present password does not match the one that common-
password wants. In my case this was the reason why I was getting that
authentication token error.

== This solution helped 41 people ==
If you insert the wrong passwd
$ passwd
Changing password for rinzwind.
(current) UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged
you get this error. If you are sure that you inserted the correct one, this
error might also show up if you are using shadowed password files and the
shadow doesn’t have an entry for this user (basically/etc/passwd has an entry
for this user, but /etc/shadow does not).
In order to fix this, you can either add the entry manually (make a backup
first!!!) or recreate the shadow file with pwconv (http://manpages.ubuntu.com/
manpages/natty/pl/man8/pwconv.8.html).

== This solution helped 62 people ==
Do these two things just to make sure:
mount -o remount,rw /
This first part remounts the root partition as read/write since it was only in
read mode. It actually dismounts the root partition and then mounts it again as
read/write.
Then do this:
chmod 640 /etc/shadow
Then do the sudo passwd USER. It should work after that. This part gives the
correct permissions to the shadow file.

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 slm (https://askubuntu.com/users/17531), user sffc (https://askubuntu.com/users/319655), user Rinzwind (https://askubuntu.com/users/15811), user Revanth Kumar (https://askubuntu.com/users/348876), user Murlo (https://askubuntu.com/users/387895), user Magellan (https://askubuntu.com/users/40258), user Luis Alvarado (https://askubuntu.com/users/7035), user jouell (https://askubuntu.com/users/415328), user Fabby (https://askubuntu.com/users/344926), user erikbwork (https://askubuntu.com/users/61241), user Braiam (https://askubuntu.com/users/169736), user Bernard (https://askubuntu.com/users/156779), user Bakhtiyor (https://askubuntu.com/users/161), user Android Dev (https://askubuntu.com/users/518562), user Aibara (https://askubuntu.com/users/11317), user A.B. (https://askubuntu.com/users/367165), and the Stack Exchange Network (http://stackoverflow.com/questions/57620). 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.