Become Another User with su and sudo
Work as someone else without logging out: start a real login session with su, run single commands as another user, read what sudo allows and what it logged, and give a colleague admin rights through group membership.
Skill labbeginner~25 minFree
What you'll do
- ✓Tell su from su - by what happens to the environment, PATH and directory
- ✓Run one command as another user with su -c and with sudo -u
- ✓Read sudo -l and find sudo's records in the log
- ✓Grant admin rights by adding a user to wheel without losing other groups
Lab outline
- 01Become another user
- 02sudo
- 03Grant and audit
Before you start
- User Account Lifecycle
- Groups and Shared Project Directories
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.