67

I need to add a group of users to my system. I read the adduser and addgroup manpages and the question here about "users" and "system users".

I need clarification with groups and system groups, because as far as I know, groups can't login, so the "can't login" particularity of system users does not seem to make sense for groups.

1 Answer 1

77

There is no inherent difference between system groups and 'normal' groups, just like there is none between system users and regular users. It is by convention that human users are assigned uids from a certain number (e.g. 1000) upwards, whereas system users get uids in a range below that number.

The actual uid number, apart from the special uid 0 which is reserved for root, has no meaning at all and does not convey any privileges.

We distinguish system users and regular users only because they are treated differently. For instance, there is no point in displaying system users in a graphical login manager. Also, most system users don't need a login shell or home directory, whereas human users (normally) do.

The --system option of the adduser command is no more than a convenience for the administrator, as it presets a number of options to sensible values for a 'system account'. In fact, the whole adduser command is a convenience wrapper around (lower level commands like useradd and groupadd, which are wrappers around) essentially just editing /etc/passwd and /etc/group.

4
  • So, for my need to create a group of human users there is no difference (but the id number) if I create this group with MIN_GID<gid<MAX_GID or MIN_SYSTEM_GID<gid<MAX_SYSTEM_GID? whatever I use --system and/or --gid ? I am puzzled by the buggy man: adduser --group (w/o --system) or addgroup (w/o --system) will add a user group. A GID will be choosen from the range specified for system GIDS in the configuration file. I checked but the gid is 1002 ???
    – useful
    Sep 15, 2014 at 9:54
  • @useful The man page isn't great and indeed it (technically) wouldn't matter in what range the gid is, but since you are creating a group for human users I'd stick with convention and not make it a system group (nor explicitly assign a gid, but let the system pick it).
    – zwets
    Sep 15, 2014 at 10:18
  • Thanks Zwets. I created it with --gid 29999 to keep my further users+usergroups have the same uid/gid.
    – useful
    Sep 15, 2014 at 10:33
  • 3
    When you create a system user, by the fault the command doesn't create a home folder and its terminal is set to /bin/false, whereas for normal users these defaults doesn't apply.
    – ABu
    Mar 3, 2016 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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