Debian 9.3 droplet issues with useradd

January 9, 2018 3k views
Linux Commands Debian

I created a new Debian 9.3 droplet and logged in as root.

  • It seems, there is by default already a non-root user "debian" created. Is there a reason for this?

    • useradd command gives strange notices: $ useradd -m foo sent invalidate(passwd) request, exiting sent invalidate(group) request, exiting

This seems to be oputput from the nscd application.

Similar output is generated also with "adduser" command

$ adduser asd
Adding user `asd' ...
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
Adding new group `asd' (1001) ...
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
Adding new user `asd' (1001) with group `asd' ...
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
Creating home directory `/home/asd' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for asd
Enter the new value, or press ENTER for the default
    Full Name []: asdd
    Room Number []: asd
    Work Phone []: asd
    Home Phone []: asd
    Other []: asd
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting

Is this really a feature?

5 Answers

I am having the same issues. Looks like it's not an issue, but you can get rid of it by removing the name caching servie:

# apt-get remove unscd
  • And the non-root user is for cloud-init. In the future I'd prefer a minimal install, without any extras at all, only a root user.

    But I think this is a little too much to ask, because I am probably alone in this boat ...
    I understand DO's need to cater to more wide range of people.

  • On a side note: nscd service is for preventing the /etc/passwd file or NIS(+) or LDAP server having to be queried for each UID lookup. I presume this functionality is useful mainly when building with cloud-init.

    When you have a single user running systems, then IMHO this service is useless.

  • removing unscd helped, thanks

Really annoying, I did not see where the problem in my script was until I destroyed and recreated two droplets. Would be great if this could be fixed.

It would be nice if DigitalOcean would weigh in on this.

Wayne Sallee
Wayne@WayneSallee.com

  • I added the following to my initial setup:

    apt-get remove --purge unscd
    userdel -r debian

    only after that I am creating new users and doing the machine setup. Hope this helps.

I can't see any possible reason not to remove both of them. So I sent an e-mail to digitalocean:

https://www.digitalocean.com/community/questions/debian-9-3-droplet-issues-with-useradd?answer=42778

It would be good to get an official answer on this.

Is there any reason to keep the debian user or to keep the pre-installed and buggy unscd ?

Digigal Ocean response:

Hello,

Thank you for contacting DigitalOcean!

You could purge the unscd user from your end and try again to add the user. Please run the following commands:

apt-get remove --purge unscd
userdel -r debian

Please feel free to reach out to us via this ticket if you have further queries or concerns, we will be around to help you out!

Kind Regards,

Sandesh
Platform Support Specialist
DigitalOcean 

Maybe they should add this to their documents, and anything else that should be removed from their droplets.

Strange forum here, I see a "code" function, but not a "quote" function.

Wayne Sallee
Wayne@WayneSallee.com

Have another answer? Share your knowledge.