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

groupmod --help -U option description is misleading; implies listing users, not replacing them

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.2
    • rhel-9.6, rhel-10.0
    • shadow-utils
    • None
    • shadow-utils-4.15.0-9.el10
    • No
    • Moderate
    • 1
    • rhel-idm-zta
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • ZTA: RHELs for 10.2 and 9.8
    • Unspecified Release Note Type - Unknown
    • Unspecified
    • Unspecified
    • Unspecified
    • x86_64
    • None

          1. Bug Summary:
            The `groupmod` command's `--help` output shows:

        -U, --users USERS    list of user members of this group

      However, this is *misleading. The `-U` option **does not list* users — it *replaces* the current list of members in the group with the provided list.

      This could lead to *accidental removal* of existing group members by misunderstanding the help text.

          1. Steps to Reproduce:
            1. Run: `groupmod --help`
            2. Observe the line for `-U`
            3. Try using `groupmod -U user1 wheel` expecting it to add user1 — it instead replaces all members
          1. Expected Behavior:
            The help message should clearly state that `-U` *overwrites* the group membership.
          1. Suggested Fix:
            Update the help text to something like:
              `-U, --users USERS    replace the list of user members of this group`

      This makes it consistent with the actual behavior.

          1. Environment:
      • RHEL 9.6
      • `groupmod` from `shadow-utils`
          1. Impact:
            Potential administrative mistakes in production environments where sysadmins might accidentally remove all group members (e.g., from `wheel`), creating access or sudo issues.

      Please update the documentation/help output for clarity.

              ipedrosa@redhat.com Iker Pedrosa
              arshdeepsinghsahni Arshdeep Singh Sahni (Inactive)
              Iker Pedrosa Iker Pedrosa
              Anuj Borah Anuj Borah
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: