Skip to main content
2 of 2
Formatting
jasonwryan
  • 74.9k
  • 35
  • 204
  • 232

If you got that error it is because the user you wanted to add previously existed and was deleted. And since it existed in the /etc/passwd file, the system automatically created an encrypted passwd in the /etc/shadow for that user. Therefore when the user was deleted from the /etc/passwd, the encrypted passwd should have been deleted from the /etc/shadow file.

Put it this way: you can't add a user with the useradd command if a password already exists for that user in the /etc/shadow file.

Go to the /etc/shadow file and delete the password line for that user and then you'll be able to add the user.