useradd: ERROR: Inconsistent password files


While using useradd command to add my user, I got this error:
UX: /usr/sbin/useradd: ERROR: Inconsistent password files. See pwconv(1M).
Logged in as root, I checked the no. of lines in /etc/passwd and /etc/shadow:
# cat /etc/shadow |wc -l
299
# cat /etc/passwd |wc -l
300
vi /etc/passwd
I saw that last line was a blank and removed the blank line.
Using useradd command worked now without issues.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: