If you are a Linux user, you may have encountered the error « passwd: authentication token error » when trying to change your password.
[root@Linux ~]# passwd user Change password for user. New password: Retype the new password: passwd: authentication token manipulation error
This error can be frustrating and confusing, especially if you are not familiar with the Linux command line. However, this error can be resolved and this article will guide you through the process of resolving this error.
Understanding the authentication token manipulation error
Before moving on to the steps for resolving this error, it is important to understand its.
The error occurs when the system fails to update the user’s authentication token.
An authentication token is a piece of information used to verify a user’s identity. When you log into your Linux system, your authentication token is generated and stored, and it is used to authenticate any action that requires administrative privileges, such as changing your password.
When the error « passwd: authentication token manipulation error » is displayed, it means that the system could not update your authentication.
There are several reasons why this error message may appear. Here are the ones I have encountered :
Read-only mounted file system
If the root file system is mounted as read-only, the password cannot be changed as both /etc/passwd and /etc/shadow cannot be changed.
To mount the root file system fas read-write, type the following mount command :
[root@Linux ~]# mount -rw -o remount /
[root@Linux ~]# mount | grep /dev/mapper/linux-root /dev/mapper/rhel-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
Root file system is full
If the root file system is full, the passwd program cannot modify both /etc/passwd and /etc/shadow. So check if the FS / is full with the df command :
[root@Linux ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 25M 3.8G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/mapper/Linux-root 25G 25G 1.2M 100% / /dev/sda1 1014M 225M 790M 23% /boot
If this is the root cause, free up the space in the root file system and the the problem will be solved.
To read this article in French click here.