root
Cheat sheet · https://pcornel.dk/topic.php?topic=2700
Answer
root (UID 0) is the superuser: it bypasses permission checks and can change anything on the system.
Remember
Work as a normal user and use sudo for single commands; it logs who did what. Disable direct root SSH login (PermitRootLogin no or prohibit-password). Keep a way to reach root for recovery (console, rescue mode).
First checks
sshd -T | grep -i permitrootlogin— effective root login settingid <user>— UID, primary group and groupsgetent passwd <user>— account entry (local or directory)getent group <group>— group memberssudo -l -U <user>— what the user may run with sudo
Commands
sudo <command>sudo -isudo -spingsudo
Verify in this order
admin user authenticates → sudo checks the sudoers rules → command runs as UID 0 → action logged
Where it usually breaks
First mismatch in identity/group resolution → Unix mode/ACL/capability → mount/sandbox constraint → SELinux/AppArmor policy → credential/TLS trust → protected operation; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2700