Fix "Authentication Token Manipulation Error" When Changing User Password In Ubuntu

There is a “Authentication Token Manipulation Error” when trying to update user’s password in Ubuntu.

$ sudo passwd USERNAME
# ...
passwd: Authentication token manipulation error
passwd: password unchanged

The reason why passwd failed is that filesystem was mounted as read only, which prevents changing the password.

A way to fix this issue is to remount filesystem and then to check permissions of /etc/shadow file.

$ mount -rw -o remount /
# or
$ mount -o remount,rw /

Check the write permission of /etc/shadow file.

$ ls -l /etc/shadow
-rw-r----- 1 root shadow 1025 Feb  11 22:11 /etc/shadow

That’s OK, now passwd will work well.

$ sudo passwd USERNAME

Refer: https://www.codevoila.com/post/26/fix-authentication-token-manipulation-error-when-changing-user-password-in-ubuntu