sudo = POWER!! (managing users in Linux) // Linux for Hackers // EP4
About this video
Episode 4 of Linux for Hackers, taught in a free Hack The Box Academy browser lab, uses an Avengers-versus-Thanos storyline to teach Linux user management. The creator shows whoami, then contrasts adduser — interactive, prompting for a password and details and creating a home directory — with the leaner useradd, which creates little else and leaves you to set a password with passwd and a home directory with the -m flag. He decodes /etc/passwd (username, the x pointing to /etc/shadow for hashed passwords, UID and GID — his example user Thor gets 1001/1001 — home directory and default shell) and uses usermod to change a shell to bash or rename an account. sudo is framed as the Infinity Gauntlet: temporary superuser power governed by the sudoers file, which should only be edited with visudo so syntax errors are caught before saving. He demonstrates su to switch users, groupadd and /etc/group, adding a user to a group with usermod -aG, removing one with gpasswd -d, and deleting users and groups with userdel and groupdel. The finale applies least privilege: once Thanos is deleted, the all-powerful group itself is removed so no one keeps unnecessary sudo access.
Key takeaways
- adduser is the friendly, interactive route (password prompts, home directory); useradd is minimal — pair it with passwd for a password and -m if the user needs a home directory.
- /etc/passwd lists every account with its UID, GID, home directory and shell; the x means the actual hashed password lives in /etc/shadow.
- Modify accounts with usermod — change shells, rename users, and use -aG to append a group rather than -g, which would replace the user’s other groups.
- sudo access is controlled by the sudoers file, including group-based rules prefixed with %; always edit it with visudo so a syntax error cannot lock you out.
- Remove a user from a group with gpasswd -d, delete accounts with userdel and groups with groupdel, and follow least privilege by deleting powerful groups when they are no longer needed.
Episode details: published May 21, 2021 · 28:19 long. Summary written by Self Growth Videos from the episode itself. Business results and any income figures mentioned are NetworkChuck’s own claims, shared for education — they are not typical or guaranteed.
← Previous: i put a DARK WEB website on a Raspberry Pi!! · Next: fiber optic cables (what you NEED to know) // FREE CCNA // EP 13 →
All NetworkChuck videos · NetworkChuck profile · NetworkChuck on YouTube





