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

Written against the versions above. `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.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

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