Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-101885

/etc/login.defs USERGROUPS_ENAB inline description is incomplete

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • shadow-utils
    • None
    • None
    • rhel-idm-zta
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      The inline description of USERGROUPS_ENAB option suggests that the option solely dictates the behaviour of userdel.

      #
      # Enables userdel(8) to remove user groups if no members exist.
      #
      USERGROUPS_ENAB yes

      However, the option changes the behaviour of useradd as well as userdel. The inline description should briefly mention the useradd behaviour, i.e. user group will be added.

       

      $ man useradd
      <...>
             By default, a group will also be created for the new user (see -g, -N,
             -U, and USERGROUPS_ENAB).
      <...>
             -g, --gid GROUP
                 The name or the number of the user's primary group. The group name
                 must exist. A group number must refer to an already existing group.
                 If not specified, the behavior of useradd will depend on the
                 USERGROUPS_ENAB variable in /etc/login.defs. If this variable is set
                 to yes (or -U/--user-group is specified on the command line), a
                 group will be created for the user, with the same name as her
                 loginname. If the variable is set to no (or -N/--no-user-group is
                 specified on the command line), useradd will set the primary group
                 of the new user to the value specified by the GROUP variable in
                 /etc/default/useradd, or 1000 by default.
      <...>
             -N, --no-user-group
                 Do not create a group with the same name as the user, but add the
                 user to the group specified by the -g option or by the GROUP
                 variable in /etc/default/useradd.
                 The default behavior (if the -g, -N, and -U options are not
                 specified) is defined by the USERGROUPS_ENAB variable in
                 /etc/login.defs.
      <...>
             -U, --user-group
                 Create a group with the same name as the user, and add the user to
                 this group.
                 The default behavior (if the -g, -N, and -U options are not
                 specified) is defined by the USERGROUPS_ENAB variable in
                 /etc/login.defs.
      <...>
             USERGROUPS_ENAB (boolean)
                 If set to yes, userdel will remove the user's group if it contains
                 no more members, and useradd will create by default a group with the
                 name of the user.
      

       

              ipedrosa@redhat.com Iker Pedrosa
              rhn-support-suwu Sunny Wu
              Iker Pedrosa Iker Pedrosa
              Anuj Borah Anuj Borah
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: