Open In App

How to Fix “passwd: Authentication token manipulation error” in Linux

Last Updated : 28 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Encountering the "passwd: Authentication token manipulation error" when trying to change your password in a Linux system can be frustrating. This error usually indicates that the password change attempt was unsuccessful, and it can happen for various reasons.

There can be many reasons for that like if you don't supply the password output will give you the information "No password supply" or if the password is mismatched output will give you the information "Sorry, passwords do not match" then in both the cases you will be getting Authentication Token Manipulation Error. Well, in these cases you know what is causing the error right and you can simply fix it, but there are cases where you won't see any information, and the output will be an Authentication token manipulation error.

Methods to Fix the "passwd: Authentication Token Manipulation Error"

Let's see the other cases and how to fix the error:

Method 1: Reboot System

Try rebooting the system it does work, and you won't get the same error

$ sudo reboot

After rebooting, try changing your password again. If the problem persists, proceed to the next steps.

Method 2: Set Correct Permissions on Shadow File.

In a Linux system, the '/etc/shadow' file keeps the password or stores the actual password for a user account in an encrypted format and this can be the reason behind the error. It can be fixed by setting the correct permission on it.

To set the correct permissions on it, use the below chmod command.

$ sudo chmod 0640 /etc/shadow
How to Fix “passwd: Authentication token manipulation error” in Linux

Explanation: The 'chmod 0640' command sets the appropriate read and write permissions for the root user and read-only access for the group.

Method 3: Remount Root Partition

If the partition is mounted as read-only as you will get the error that means no files can be modified, which means a user’s password can’t be changed, since you have to change the password you must mount the root partition as read/write 

The below command will do that and will fix the error:

$ sudo mount -o remount,rw /
How to Fix “passwd: Authentication token manipulation error” in Linux

After executing the command, try updating your password again to see if the error is resolved.

Method 4: Clean the Disk Space

Sometimes, when your disk gets full then also creates an Authentication token manipulation error. So in this case we will clear all the space and try to log in again. There are some tools you can use to clean the disk space: Agedu, BleachBit.

Method 5: Repair the Filesystem file.

We can also use this technique to overcome this error, you can use disk cleaning space such as fsck tools.

  • First, boot into single-user mode or recovery mode.
  • Run the following command to check and repair the root filesystem:
$ sudo fsck -f /

Explanation: 'fsck -f' forces a filesystem check and repairs any detected errors.

Conclusion

By following these methods, you can address the "passwd: Authentication token manipulation error" and successfully change your password on a Linux system. Ensure you check system permissions, disk space, and filesystem integrity as part of your troubleshooting process.


Next Article
Article Tags :

Similar Reads