Monday, September 14, 2009

ERROR: Inconsistent password files | Ubuntu Howto

Tech Blog - Here is a short how to on fixing "ERROR: Inconsistent password files" when adding or modifying user account on Ubuntu Linux or Unix operating systems, usually the cost of this error are there are some error entries or on the passwd line such as missing GID or other credentials.

Attempt to add user get the error below
$ useradd ironman
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).


So we try running pwconv as suggested, the pwconv command alert us that there is a problem on line 172 to line 175 of the passwd file
$ pwconv
pwconv: ERROR: bad entry or blank line at line 172 in /etc/passwd
pwconv: ERROR: bad entry or blank line at line 173 in /etc/passwd
pwconv: ERROR: bad entry or blank line at line 174 in /etc/passwd
pwconv: ERROR: bad entry or blank line at line 175 in /etc/passwd

We go cd to /etc then backup passwd befor we edit passwd
$ cd /etc $ cp passwd passwd.20090910

Now that we have a backup incase something goes wrong do vi passwd, and go to the lines above and see if there are incomplete entries on thos lines, sometimes its is just a blank line with space, you will need to delete the lines.

Tech Blog Quick List of howto's:

No comments:

For suggestion and concerns E-mail