Resolved: passwd: authentication token manipulation error – Linux

If we want to change password using passwd command, we might get this error: passwd: authentication token manipulation error.

This is really annoying when you are trying to change Linux password remotely.

So I tried hard to find a solution that could actually help me to fix the issue.

Solution 1:


To ensure your system is functioning correctly, you’ll need to perform two key actions:

Firstly, enter the command mount -o remount,rw /. This step is crucial as it changes the mounting status of your root partition. Initially, your root partition is mounted in a read-only mode for safety and stability. By executing this command, you’re essentially remounting the root partition to allow both read and write operations. Think of it like switching your partition from a ‘view only’ mode to an ‘edit mode’.

Next, you’ll want to adjust the permissions of a specific file for security reasons. Type chmod 640 /etc/shadow into the command line. This command modifies the access permissions of the ‘shadow’ file, which contains sensitive user password information. The ‘640’ setting ensures that only certain users can read or modify this file, adding an extra layer of protection against unauthorized access.

After completing these two steps, try changing a user’s password with the command sudo passwd USER. With the changes you’ve made, this should now work without any issues. This last step is essential for maintaining individual user security on your system.

Solution 2: If you enter wrong password this error can occur

If you’ve tried changing your password and run into an error, don’t worry, it happens! When you type in $ passwd to change your password and then see a message like this:

Changing password for rinzwind.
(current) UNIX password: 
passwd: Authentication token manipulation error
passwd: password unchanged

If the above methods are not working for you you can do the below:

Some other solutions:

If you’re encountering the “passwd: Authentication token manipulation error” while trying to change your password, here are a couple of straightforward solutions you can try:

  1. Give Your System a Fresh Start with a Reboot Sometimes, the simplest solution is to restart your system. I can’t pinpoint exactly why, but rebooting worked wonders for me on my CentOS 7. Just type in $ sudo reboot. If you’re still stuck after rebooting, don’t worry, we’ve got more tricks up our sleeve.
  2. Check and Adjust Your PAM (Pluggable Authentication Module) Settings Another reason you might be seeing this error is due to incorrect PAM settings. PAM is crucial because it handles the authentication processes, including password changes. If PAM can’t fetch the new authentication token, you’ll run into errors. You can find the various PAM settings in the /etc/pam.d/ directory. To take a peek, just run $ ls -l /etc/pam.d/.

A misconfiguration in files like /etc/pam.d/common-password could be causing your headache. To fix this, you can use the pam-auth-update command with root privileges. Simply type $ sudo pam-auth-update, and follow the prompts to adjust the settings.With these steps, you should be able to resolve the password change issue and get things back to normal. 🛠️💻

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top