2

While trying to install Hadoop I created two users, one with the same name than the usual user. I want to get rid of it without deleting the one I'm usually using. Do you know how to do it ?

Here is the gedit /etc/passwd output :

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false
systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false
syslog:x:104:108::/home/syslog:/bin/false
_apt:x:105:65534::/nonexistent:/bin/false
messagebus:x:106:110::/var/run/dbus:/bin/false
uuidd:x:107:111::/run/uuidd:/bin/false
lightdm:x:108:114:Light Display Manager:/var/lib/lightdm:/bin/false
whoopsie:x:109:117::/nonexistent:/bin/false
avahi-autoipd:x:110:119:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
avahi:x:111:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
dnsmasq:x:112:65534:dnsmasq,,,:/var/lib/misc:/bin/false
colord:x:113:123:colord colour management daemon,,,:/var/lib/colord:/bin/false
speech-dispatcher:x:114:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/false
hplip:x:115:7:HPLIP system user,,,:/var/run/hplip:/bin/false
kernoops:x:116:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
pulse:x:117:124:PulseAudio daemon,,,:/var/run/pulse:/bin/false
rtkit:x:118:126:RealtimeKit,,,:/proc:/bin/false
saned:x:119:127::/var/lib/saned:/bin/false
usbmux:x:120:46:usbmux daemon,,,:/var/lib/usbmux:/bin/false
mike:x:1000:1000:mike,,,:/home/mike:/bin/bash
mongodb:x:121:65534::/home/mongodb:/bin/false
hadoop:x:1001:1001::/home/hadoop:
sshd:x:122:65534::/var/run/sshd:/usr/sbin/nologin
hduser:x:1002:1001:mike,A10,+33620050318,:/home/hduser:/bin/bash

I'm using ubuntu 16.04

  • What tool let you create a duplicate username? – Ignacio Vazquez-Abrams Nov 14 '17 at 13:06
  • @IgnacioVazquez-Abrams sudo addgroup or sudo adduser. I don't remeber if it is from from this tutorial from michael-noll – Revolucion for Monica Nov 14 '17 at 13:08
  • "or"? As in you don't know which one? – Ignacio Vazquez-Abrams Nov 14 '17 at 13:09
  • @IgnacioVazquez-Abrams, Indeed, I noticed it while restarting my laptop – Revolucion for Monica Nov 14 '17 at 13:09
  • I don't think either of those commands will let you create a redundant/duplicate user. What makes you think you have two users with the same name? – igal Nov 14 '17 at 13:22
2

Look at the following two lines taken from your /etc/passwd file:

mike:x:1000:1000:mike,,,:/home/mike:/bin/bash
hduser:x:1002:1001:mike,A10,+33620050318,:/home/hduser:/bin/bash

You have two different users with different login names, but with the same "Full Name" of "mike". My guess is that your "duplicate" user is the one with login name "hduser".

For more information about the format of the /etc/passwd file you might refer to the following page from the Linux Documentation Project:

I would also assume that the "Full Name" (i.e. "mike") is what's being displayed by your GUI login screen. If so, then that's the user you should delete. You can do this from the command-line like so:

sudo userdel hduser

You could also do this via the Ubuntu GUI. For further discussion regarding user management in Ubuntu you may refer to the following post on AskUbuntu:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.