CertGrid CertGrid
Hands-on Lab·CompTIA Linux+

Accounts, sudo, and what a login reads

Domain 2 is 20% of XK0-006 and half of it is accounts. This guide reads the defaults before creating anything, makes a real user and shows where every file in its home came from, writes a sudo rule and validates it, breaks a rule on purpose to see what the checker says, and demonstrates which startup files a login shell reads that an ordinary one does not.

Services and Users Guide 12 of 28 Intermediate

One host. Account defaults and sudo policy work identically on the RPM family; where the values differ, the first services guide on this path shows both.
Server NameIP AddressOSRolesCPURAMHDD
LPLUS-A01192.168.0.73Ubuntu 26.04 LTSDebian-family host - apt, ufw, netplan, AppArmor2 Core4 GB50 GB

This guide includes

Use this when granting someone limited administrative access, or when a script works interactively and fails from cron. This matters because an unvalidated sudoers file can lock every administrator out of a machine, and because a non-login shell never reads the profile that sets the PATH you were relying on.

Before you start

  1. What useradd will do, before it does it

  2. A real account, and where its home came from

  3. A sudo rule, checked before it is installed

  4. A broken rule, and the check that catches it

  5. What a login actually reads

  6. Putting the machine back

Official sources