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
- OSRHEL 10.0
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 14 min
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.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 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.
- reading the two account databases
- creating an account, and finding where its defaults came from
- creating one with explicit options, since exam tasks specify the details
- modifying an account that already exists
- deleting one, and finding exactly what gets left behind
Before you start
- A sudo-capable account.
- The session creates and removes several accounts and their home directories.
-
The machine this guide assumes
-
The two account databases
-
Creating an account
-
Where the defaults come from
-
Creating with explicit options
-
Modifying an account
-
Deleting, and what gets left behind