Ubuntu – adduser says user exists when the user does not exist

adduserusers

As the subject says, I'm trying to add a new user. When I run the command, it says the user already exists. But looking in /etc/passwd, /etc/group, and /etc/shadow shows that the user does not exist.

Running the command on my local machine works just fine. I'm running Ubuntu 11.10 on both.

Here's my terminal commands and output:

root@ws-prod-www-01:~# useradd -s /sbin/nologin -m -d /var/www/html/atc -g 33 -u 10141 atc
useradd: user 'atc' already exists
root@ws-prod-www-01:~# grep atc /etc/passwd
speech-dispatcher:x:111:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
root@ws-prod-www-01:~# grep atc /etc/shadow
speech-dispatcher:!:15259:0:99999:7:::
root@ws-prod-www-01:~# grep atc /etc/group
root@ws-prod-www-01:~# 

I also tried:

root@ws-prod-www-01:~# adduser --shell /sbin/nologin --home /var/www/html/atc --gid 33 --uid 10141 atc
Warning: The home dir /var/www/html/atc you specified already exists.
adduser: The user `atc' already exists.
root@ws-prod-www-01:~# 

Any thoughts?

Best Answer

Try typing the following in a terminal

sudo userdel -r atc

This should remove all instances of the user

Related Question