Lesson 1.11: Users, groups, root and sudo
How Linux decides who may do what: user IDs, groups, the all-powerful root account, and sudo, which lets chosen users run chosen commands as root and logs every use. Why admins use sudo instead of logging in as root, what sudo -l reveals, and how offboarding should remove access the day someone leaves. In the lab you find that a contractor who left three weeks ago still has full sudo rights on the application server, remove them, lock the account and confirm the result.
16 min
You will learn to
- Explain UIDs, groups and root
- Explain how sudo grants and logs root rights
- Read sudo -l for any user
- Remove a user from a group and lock an account
- Explain offboarding
Key terms
- UID and GID
- Numbers that identify a user and a group. The kernel checks numbers, not names.
- root
- The superuser account with unlimited rights on a Linux system.
- sudo
- A program that lets permitted users run commands as root (or another user), configured in /etc/sudoers and /etc/sudoers.d/, with every use logged.
- Offboarding
- Removing a person's access everywhere when they leave or change role.
- Account locking
- Disabling login without deleting the account.
← Layered models: OSI and TCP/IP · All lessons · Requests, parameters, cookies and sessions →