[Pkg-shadow-devel] Bug#416835: /usr/sbin/useradd: contrary to documentation, useradd creates per-user groups

Justin Pryzby justinpryzby at users.sourceforge.net
Fri Mar 30 18:15:50 UTC 2007

On Fri, Mar 30, 2007 at 04:16:23PM +0000, river at hemlock.knams.wikimedia.org wrote:
> Package: passwd
> Version: 1:
> Severity: normal
> File: /usr/sbin/useradd
> according to /etc/default/useradd, useradd(8) is not capable of creating
> per-user groups.

> its manual page does not mention that it can or will
> do so.  the manual page also says that when no group is specified, the
> default group is "1".  despite this, when useradd is invoked without -g,
> per-user groups are created:
This seems to be a contribution of radhet:

       When invoked without the --DD option, the uusseerraadddd command creates a new
       user account using the values specified on the command line and the
       default values from the system. Depending on command line options, the
       useradd command will update system files and may also create the new
       user’s home directory and copy initial files. The version provided with
       Red Hat Linux will create a group for each user added to the system by

       --ll Do not add the user to the last login log file. This is an option
          added by Red Hat.

       --nn A group having the same name as the user being added to the system
          will be created by default. This option will turn off this Red Hat
          Linux specific behavior. When this option is used, users by default
          will be placed in whatever group is specified in
          _/_e_t_c_/_d_e_f_a_u_l_t_/_u_s_e_r_a_d_d. If no default group is defined, group 1 will
          be used.

          UID lower than the value of UID_MIN defined in _/_e_t_c_/_l_o_g_i_n_._d_e_f_s and
          whose password does not expire. Note that uusseerraadddd will not create a
          home directory for such an user, regardless of the default setting
          in _/_e_t_c_/_l_o_g_i_n_._d_e_f_s. You have to specify --mm option if you want a home
          directory for a system account to be created. This is an option
          added by Red Hat

       The system administrator is responsible for placing the default user
       files in the _/_e_t_c_/_s_k_e_l_/ directory.
       This version of useradd was modified by Red Hat to suit Red Hat
       user/group conventions.

More information about the Pkg-shadow-devel mailing list