Tips and tricks: When I am trying to add a user, the following error occurs: mismatch in /etc/passwd and /etc/shadow. What does this mean?

摘自: www.redhatmagazine.com  被阅读次数: 136


yangyi 于 2008-04-20 21:18:40 提供


by the editorial team

This can occur when there is inconsistencies between the /etc/passwd and /etc/shadow files. The offending account needs to either be modified or removed. To find out which account is causing the issue run the following command as root:

pwck

All entries in the /etc/passwd and /etc/shadow are checked to see that the entry has the proper format and valid data in each field. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.

An example of an account that is in /etc/shadow but not in /etc/passwd:

no matching password file entry in /etc/passwd
delete line 'someuser:!!:13758:0:99999:8:::'?

Original link: http://www.redhatmagazine.com/20...