All Products
Search
Document Center

:Solution to the "Authentication token manipulation error" error reported when changing Linux passwords

Last Updated:Dec 29, 2020

Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.

 

Problem description

The passwd command failed to modify the password for the ECS instance in the Linux. The "Authentication token manipulation error" error message is displayed.

 

Cause

The possible causes are as follows:

  • The "-i" security attribute is set for files related to user passwords.
  • Files related to user passwords have been tampered with or exceptions occurred.
    Note: documents related to password management are as follows.
    • /etc/passwd
    • /etc/shadow
    • /etc/group
    • /etc/gshadow

 

Solution

  1. Log on to the ECS instance and run the following command to check the password-related file permissions and view the attribute configuration of the file. Remove these files from the file list before you try to change the password.
    lsattr /etc/*shadow /etc/passwd /etc/group
    The following command output is returned.
    ------------- /etc/gshadow
    ------------- /etc/shadow
    ------------- /etc/passwd
    ------------- /etc/group
  2. If the "-i" attribute exists, run the following command to disable the security attribute:
    chattr -i /etc/*shadow /etc/passwd /etc/group
  1. Try changing the password again.
  2. If the error persists, run the following command to back up the shadow file:
    mv shadow shadow.bak
  3. Run the following command to enable the user's projection password:
    pwconv
  4. Try to change the password again.

 

Application scope

  • ECS