Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to add a new user in solaris 10, but got an error:

$ useradd -g oinstall -G dba -d /export/home/oracle oracle
UX: useradd: ERROR: Inconsistent password files.  See pwconv(1M).

I ran pwconv, but nothing was displayed. I also tried to sync the shadow & passwd files, but there's still an error:

$ wc -l /etc/passwd /etc/shadow
  17 /etc/passwd
  17 /etc/shadow
  34 total
share|improve this question
Compare the passwd and the shadow file manually line by line. Maybe some lines are out of order.... – Dayjay Mar 25 '11 at 7:05
@Dayjay i has manually checked 2 files, they has same line order – QuanNH Mar 25 '11 at 8:28

Check the integrity of /etc/passwd and related files with pwck. Do the same for group related files with grpck.

share|improve this answer
i ran pwck & grpck, but nothing was displayed :( – QuanNH Mar 28 '11 at 2:45

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.

share|improve this answer
Make sure to also check /etc/user_attr. This is checked in the useradd process too. – Ken J Feb 16 '15 at 12:21

Most likely your server is a NIS client and hence adding local users maybe forbidden. Just check if this is a part of NIS domain.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.