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

User Account Management

One objective, and the commands are short. What is worth the guide is where the defaults come from - two separate files decide what a new account looks like - and the fact that userdel without -r leaves an orphaned home directory owned by a UID that no longer exists.

Users and Groups Guide 17 of 67 Beginner

useradd reads defaults from both /etc/default/useradd and /etc/login.defs. They are not interchangeable: the first holds useradd's own defaults, the second holds system-wide policy shared with passwd and chage.

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 an objective with short commands and a long tail. This matters because the defaults come from a file you can read - and deleting an account leaves things behind unless you say otherwise.

Before you start

  1. The machine this guide assumes

  2. The two account databases

  3. Creating an account

  4. Where the defaults come from

  5. Creating with explicit options

  6. Modifying an account

  7. Deleting, and what gets left behind

Official sources