By lfctatung
After ssh into root@ipAddress, I tried to create a new user account as “Initial Server Setup with Ubuntu 14.04” suggested. The new account was created, but with some anomalies:
after “adduser leon” and login as leon:
$ id
uid=1000(leon) gid=1000(leon) groups=1000(leon),27(sudo)
$ grep -i leon /etc/passwd
leon:x:1000:1000::/home/leon:
$ su root
root@Leon-Ubuntu:/# deluser leon
Removing user leon' ... Warning: group leon’ has no more members.
userdel: user leon is currently used by process 2060
/usr/sbin/deluser: `/usr/sbin/userdel leon’ returned error code 8. Exiting.
and it works well.
root@Leon-Ubuntu:/# adduser --home /home/leon2 leon2
root@Leon-Ubuntu:/# grep -i leon /etc/passwd
leon:x:1000:1000::/home/leon:
leon2:x:1001:1001:,:/home/leon2:/bin/bash
root@Leon-Ubuntu:/# ls /home/
leon2
root@Leon-Ubuntu:/# deluser leon2
Removing user leon2' ... Warning: group leon2’ has no more members.
Done.
Is there an explanation about this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This is odd and I cannot say that I have encountered this on Ubuntu 16.04 myself but I was able to find some information indicating that others have experienced this issue with the default adduser command in Ubuntu 16.04. It seems the issue lies with the command reading and using the defaults specified for it.
You can find some suggestions and more information here.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.