How sudo Really Works: setuid, PAM, and the sudoers File
What happens between typing sudo and getting a root shell: the setuid bit, PAM authentication, sudoers parsing, and why sudo -l matters.
ausearch -m avc -ts recentRecent SELinux denials, straight from the audit log. If getenforce says Enforcing and the app still fails, this is the next command.
Field notes from 30+ years running Unix and Linux in production — from VAX/VMS and Solaris to RHEL fleets and cloud, where downtime was never an option. Written for senior engineers who run production systems. More about unixshadow →
Test everything in dev or a lab first. These are field notes from my systems, not a runbook for yours — you’re responsible for what you run on your own.
What happens between typing sudo and getting a root shell: the setuid bit, PAM authentication, sudoers parsing, and why sudo -l matters.
OpenAI ran an autonomous pipeline over 7% of the Linux kernel and found 948 distinct privilege escalation flaws, each with a working exploit, for $1.2M in API credits.
A patching process that survives audit: rings that earn production, fixed windows, one Ansible playbook for a mixed fleet, pins with an owner and an expiry date, and a record that proves it happened.
Ubuntu LTS patching runs on apt and unattended-upgrades with no security-only flag, plus Canonical Livepatch for Critical and High kernel CVEs — and the current LTS is 26.04, not the next one.
Oracle Linux patches like RHEL until you hit the two things that make it different: the Unbreakable Enterprise Kernel and Ksplice live patching for the kernel and user space.
Patching RHEL in production means reading the advisories first, automating carefully, pinning with a reason, live-patching within its limits, and rebooting only when needs-restarting says so.