4

Is there a file that contains the list of default groups that all newly created users will belong to?

An answer to the following question provides a work-around for creating users with certain group membership, but doesn't answer whether or not a list of default groups is stored somewhere?

Change default groups assigned to new users

It's hard to believe that this is hard-coded directly into the /usr/bin/useradd binary.

  • 1
    Have you consulted man useradd? – fkraiem Mar 20 '16 at 16:53
3

By default any new user created with adduser (or from the GUI) will be in this user's group only. There is no list of additional groups.

We can add additional groups we wish a new use should be in in the configuration file /etc/adduser.conf. Just uncomment the line to define the variable EXTRA_GROUPS and add groups you need there.

# This is the list of groups that new non-system users will be added to
# Default:
#EXTRA_GROUPS="dialout cdrom floppy audio video plugdev users"

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.