Skip to main content
Formatting
Source Link
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/etc/passwd file, the system automatically created an encrypted passwd in the /etc/shadow/etc/shadow for that user. Therefore when the user was deleted from the /etc/passwd/etc/passwd, the encrypted passwd should have been deleted from the /etc/shadow file/etc/shadow file. Put

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

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

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 them you'll be able to add the user. Thanks!

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.

Source Link

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 them you'll be able to add the user. Thanks!