CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Group Membership Management

One objective, and one mistake worth more marks than the rest of the domain combined: usermod -G without -a replaces every secondary group instead of adding one, reports nothing, and exits 0. It is captured happening. The guide also builds the shared directory that group tasks usually want.

Users and Groups Guide 19 of 67 Intermediate

Red Hat uses the user private group scheme: useradd bob also creates a group bob and makes it his primary. That is why a home directory can be bob:bob and why umask 002 is safe here - the group is a group of one.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

This guide includes

Use this for the one mistake worth more marks than the rest of the domain. This matters because a single missing letter in usermod replaces every secondary group instead of adding one to them.

Before you start

  1. Primary and secondary

  2. Creating and renaming groups

  3. Adding a user to groups

  4. The missing letter

  5. The primary group decides file ownership

  6. A shared directory with SGID

  7. Removing membership and groups

Official sources