Lion Cipher Lab

Users and permissions on Linux: least privilege in practice

Why it matters

Almost every Linux security control comes back to one question: who is allowed to do what? Running everything as the all-powerful root user is the single most common way a small mistake or a single compromised program turns into a full system takeover. Learning to create a normal user, grant only the access it needs, and read and set file permissions is the everyday, defensive skill behind hardening a server, passing an audit, and limiting the blast radius when something goes wrong.

What you'll learn

Steps in this lab

  1. Who are you right now? (whoami, id, and the idea of root)
  2. Borrow power for one command, not forever (sudo)
  3. Create a normal user the way admins do (adduser / useradd)
  4. Read a permission line like a security pro (ls -l)
  5. Change permissions safely, and give the minimum (chmod)
  6. Change ownership deliberately (chown) — and see a denial happen
  7. Clean up, and why this is the job (deluser)
  8. The mindset to carry forward

Open the full interactive lab →