Linux isn’t a very cryptic OS when it comes to error codes and troubleshooting. However, more often than not, the error messages are pretty clear about where the user went wrong, and with some precision guesswork, you can get it right.
In this article, we’re going over a few fixes for the “authentication token manipulation error’ in Linux’s passwd utility used to set or change user account passwords.
Also read: RM command in Linux explained with examples
Reboot your system
One of the easiest ways of fixing just about every seemingly random issue across operating systems is to reboot your system. This can help reload files that may not have been loaded properly and avoid such problems. To reboot your Linux machine, use the following command.
Clear up some storage
It’s also a good idea to check on your system’s storage to see if you’ve run out of space. If you have, you won’t be able to modify files on that particular disk, which can trigger this error. So if you’ve got jam-packed storage, it might be a good idea to free some of it up so that your files have some stretching space.
Check the PAM module settings
If you’ve got incorrect or corrupt PAM module settings (also called Pluggable Authentication Module), you’re very likely to run into this error. This can stop the passwd utility from getting an authentication token when setting or resetting passwords.
To fix this, update the PAM module settings file using the following command.
Also read: How to add a user to a group in Linux?
Remount the Root partition
This works very similarly to restarting your machine in the sense that remounting your root partition will force all system files to reload. Just type the following command and hit enter.
sudo mount -o remount, rw /
Check Shadow File permissions
The / etc / shadow file stores all passwords for user accounts in an encrypted format. If the permissions for this file are incorrect, the system will not fetch and check passwords resulting in this error.
To fix this, use the chmod command with the 640 permissions as follows.
sudo chmod 0640 / etc / shadow
Make sure to remove the spaces before and after the slashes when typing the command into a terminal.
Check for filesystem errors
Lastly, check for any filesystem errors that you might be facing using the fsck utility. Filesystem errors can, in turn, cause file read errors which means your system will not be able to fetch and cross-verify passwords resulting in this error. You can use the following syntax for the fsck tool.
sudo fsck -Vt vfat /dev/sda1
Just ensure that you replace dev/sda1 with the partition you’re scanning for errors.
Also read: Linux no space left on device: 3 Fixes
Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars.
You can contact him here: [email protected]