Take a look at /etc/passwd
-- you've (possibly) re-used the UID (that's the number, not the name).
The fields in /etc/passwd
- login name
- optional encrypted password
- numerical user ID
- numerical group ID
- user name or comment field
- user home directory
- optional user command interpreter
You're looking for two lines with the same numerical user ID (UID) or the same user home directory. They'll be at the end of the file.
Note that your system uses shadow passwords -- there should only be an x
in the optional encrypted password
field (and don't monkey with it!).
If you do have duplicate entries (as above), you'll need to use the usermod
utility to fix the one you just added (leave the old one alone); the "fix" is to change the UID to one that is not used. Most systems start UIDs at 1000 and go up by one for each additional user, so if the duplicate is, say, 1010 and there is not 1011, simply change the new UID to 1011. The user accounts are found at the bottom of /etc/passwd
Note that you can, if you're careful, manually edit /etc/passwd
as root or with sudo. Make a backup copy first, then edit (carefully!) with your favorite text editor.
Also note that if the problem is a duplicate UID and you change the new user UID you will need to run
chown -R username /home/username
Hope this helps some.