authentication token manipulation error is common error we use to get frequently.
The problem described as below-
Getting passwd: Authentication token manipulation error on RHEL6 Machine.
[root@ip-linuxbox~]# passwd user1
Changing password for user user1.
New password:
Retype new password:
passwd: Authentication token manipulation error
[root@ip-linuxbox~]# passwd -u user1 [Tried to unlock the account password.]
Unlocking password for user user1.
passwd: Libuser error at line: 179 – error creating `/etc/passwd+’: Permission denied.
passwd: Error (password not set?) [Getting Permission denied error hence passwd is not getting changed/updated. Hence, we need to restore the permission on passwd.]
[root@ip-linuxbox~]# chage -l user1
Last password change : Apr 03, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
Solution-
[root@ip-linuxbox~]# rpm –setperms passwd [Restore permission on passwd file.]
[root@ip-linuxbox~]# which passwd | xargs chmod u+s [Setting required permission on passwd file.]
[root@ip-linuxbox ~]# restorecon /etc/* [ if SELinux context is properly set for, it will fix the same.]
[root@ip-linuxbox~]# passwd user1
Changing password for user user1.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@ip-linuxbox~]# chage -l user1
Last password change : Jul 28, 2020
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7