2

I've been trying to register using usermod command my user that is gonzalo.pincheira.

My command is

usermod -aG docker $USER

But I get this error

usermod: user 'gonzalo.pincheira' does not exist

I don't understand why happen this. Using other users that doesn't have dot in the name, the command above works fine!

I use Ubuntu 14.04

Another weird things:

If I execute whoami I get gonzalo.pincheira.

If I execute this command to see all the users in the system, my user "gonzalo.pincheira" doesn't appears!!

cut -d: -f1 /etc/passwd

root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
libuuid
syslog
messagebus
usbmux
dnsmasq
avahi-autoipd
kernoops
rtkit
saned
whoopsie
speech-dispatcher
avahi
lightdm
colord
hplip
pulse
globant
sshd
sophosav
usermetrics
clickpkg
gpincheira

Can anybody help me to understand this?

7
  • 2
    Does it work as expected if you quote your variables? usermod -aG docker "$USER"?
    – terdon
    Oct 12, 2016 at 15:27
  • What does echo $USER output for your username? Do you set your $USER variable anywhere, to make it say something different?
    – Thomas Ward
    Oct 12, 2016 at 15:52
  • 1
    Is this a personal machine, or is it in some kind of corporate LDAP / Active Directory environment? Oct 12, 2016 at 15:53
  • Information here may be useful to you askubuntu.com/questions/405638/…
    – Arronical
    Oct 12, 2016 at 15:55
  • 2
    In which case it's likely that the gonzalo.pincheira user is defined in the LDAP database - what does getent passwd | grep pincheira say? Likely usermod is not able to make changes involving non-local users/groups (although it's possible another utility such as gpasswd can e.g. gpasswd --add $USER docker) Oct 12, 2016 at 18:40

0

You must log in to answer this question.

Browse other questions tagged .