linux system changes root password error

1. Problem description

The newly launched Inspur server uses the installation platform for unified installation. After the installation is completed, the user password cannot be modified uniformly. The root account cannot modify other user passwords, and the root password of its own cannot be modified successfully. The error is reported as follows

Changing password for user root.
passwd: Authentication token manipulation error

2. Troubleshooting

Since the answer file and baseline template of the automatic installation platform were provided by Party A, the installation baseline document and ks answer file were checked. After inspection, it was found that the /etc/pam.d/systemctl-auth file had been modified

Three. Little knowledge

  • The role of the files in the /etc/pam.d directory: used to verify the configuration file for login
  • Go through every time you log in to the system or change your password
  • Pam authentication, the rules of authentication are defined here, and you will be allowed to log in only if it meets the requirements.

Four. Solve the problem

Because there is one item in the security baseline template for password security during installation, the password complexity in /etc/pam.d/system-auth needs to be modified. Because there was a backup at the time, it will be restored after it is directly overwritten.
cp /etc/pam.d/system-auth.bak /etc/pam.d/system-auth

5. Reason analysis

User password cannot be changed normally due to a new password restriction in the password policy file

Please indicate the source of reprinting:
1. The copyright of the original article marked in the blog belongs to the original author heardic;
2. The content of this article may not be reprinted without the permission of the original author, otherwise it will be regarded as an infringement;
3. The source of the reprint or quotation of this article should be indicated And the original author;
4. I reserve the right to pursue investigations for those who do not comply with this statement or use the content of this article illegally.

Guess you like

Origin blog.51cto.com/13906754/2595679