Sunday, August 22, 2010

solaris UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

When trying to add oracle user on unix or linux there might be the case that you get the following error:
solaris UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

Here are steps to fix this problem, and what causes this error.
The reason behind this error is that the /etc/passwd and /etc/shadow files are out of synchronization on your machine.
To fix this, run the following command

  • pwconv to check if there is any error, if there is/are fix that/those error(s).
  • wc -l /etc/passwd /etc/shadow to check if both password and shadow file are synchronized, the out put will be

    x /etc/passwd

    y /etc/shadow

    x+y total

    where x, y is the number of lines in passwd and shadow file, and the total line would be the sum of lines in passwd and shadow file.

0 comments: