Hands-on Lab·Red Hat Certified System Administrator
User Switching and Login Shells
The objective is "log in and switch users in multi-user targets", and the one thing worth practising is that `su user` and `su - user` leave you with different environments. Both are run side by side here, along with the four places the system records logins.
Users and Groups Guide 21 of 67 Beginner
- OSRHEL 10.0 (Coughlan)
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 13 min
- Reviewed23 August 2026
Written against the versions above. `sudo -i` is the modern equivalent of `su -` and is preferable: it is authorised by sudoers, logged, and needs your own password rather than the target account's. `su -` needs the target user's password, which is why root having no usable password does not prevent `sudo -i`.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 (Coughlan) | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
Before you start
- A sudo-capable account.
- The session creates and removes one account.
-
Who am I, and who else is here
-
su versus su dash
-
Confirming which kind of shell you got
-
The sudo equivalents
-
Where logins are recorded
-
A session in detail