root user
The all-powerful administrator account on Linux, with user ID 0, which can read or change anything.
In more detail
Root can bypass every permission check, so anything running as root can do unlimited damage if it goes wrong or is taken over. Log in as an ordinary account and gain root rights only for the work that needs them. Containers also run as root by default unless the image or runtime sets another user.
Examples
Ansible connects as an ordinary user and uses become for tasks that need root; become_user defaults to root.Build stages may run as root to install packages; the runner stage switches away.The kernel skips most permission checks for UID 0, so a mistake or compromise as root affects the whole system. Root is an identity with broad authority, not a shortcut around the permission model. Use sudo with narrow rules instead of working in a root shell.Related terms
- become — The Ansible keyword that switches on privilege escalation, so a task or a whole play runs as another account, root by default.
- privilege escalation — Gaining the rights of a more powerful account, such as root, either deliberately through a tool like sudo or illegitimately through a flaw.
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
- UID and GID — The numbers Linux uses to identify a user (UID) and a group (GID); root is UID 0.
- hardening — Reducing a system's attack surface by removing or locking down anything it does not need, such as unused services and direct root login.
- non-root user — An ordinary user account with limited rights, which a container should run its service as.
- file permissions — Rules on each file saying which user and group own it and who may read, write or run it.
- user namespace — The namespace that can map the root user inside a container to an unprivileged user on the host.
- Linux capabilities — Separate pieces of root power, such as binding low ports or changing file owners, that can be granted or removed one by one.
- least privilege — Giving every program and person only the access they need, and nothing more.
- setuid — A permission bit on an executable that makes it run with the file owner's identity instead of the identity of the user who started it.
Taught in
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Ten Requests From The Auditor — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- The Root Key In The Backup Script — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Twelve Alerts, Ten Services — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Security Sprint: Fifteen Questions' Worth — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Forty Eight Of Sixty Five — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- CodeBuild: The Build That Passed With Failing Tests — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Accounts At Scale: Vending, Guardrails And SCPs — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Recovery To RTO And RPO: Backups Nobody Could Delete — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Collecting Logs And Metrics: The Disk Nobody Measured — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Monitoring As Code: The Alarm That Watched Nothing — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Troubleshooting Failed Deployments: Read The First Failure — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Automating Data Protection: Keys, Secrets And A Partner Shortcut — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Security Hub, GuardDuty And Inspector: Signal, Noise And Response — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Long-Stem Clinic: When Two Answers Both Work — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Policy Evaluation: Deny Wins, And Both Accounts Must Agree — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Many Accounts: Organizations, SCPs And Control Tower — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Who Signs In: Identity Center, STS And Cognito — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- KMS And Envelope Encryption: Who Can Still Decrypt? — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Protecting Data: Versions, Object Lock, Backups And Secrets — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Long-Stem Clinic: The Phrase That Decides — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- Moving Around: pwd, ls, cd And Paths — Bash Scripting & Command Line Automation
- Pipelines, tee And Process Substitution — Bash Scripting & Command Line Automation
- Permissions And Ownership — Bash Scripting & Command Line Automation
- Archives, Transfers And The Network — Bash Scripting & Command Line Automation
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation
- CIA Triad, Non-Repudiation & Parkerian Hexad — Cybersecurity Fundamentals, GRC & Cryptography
- Defense-in-Depth & Security Control Categories — Cybersecurity Fundamentals, GRC & Cryptography
- Security Governance vs Security Management — Cybersecurity Fundamentals, GRC & Cryptography
- Security Baselines, Policies & Hardening Standards — Cybersecurity Fundamentals, GRC & Cryptography
- Security Frameworks: NIST CSF 2.0, ISO 27001 & CIS — Cybersecurity Fundamentals, GRC & Cryptography
- Public Key Infrastructure: X.509 Certificates & CAs — Cybersecurity Fundamentals, GRC & Cryptography
- Post-Quantum Cryptography & Key Lifecycles — Cybersecurity Fundamentals, GRC & Cryptography
- Backup Architectures: 3-2-1, Immutability & Air-Gaps — Cybersecurity Fundamentals, GRC & Cryptography
- Security Capstone Review & Certification — Cybersecurity Fundamentals, GRC & Cryptography
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- Integration Tests, Test Data And Compose Cleanup — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering
- Troubleshooting: Probes, Logs, exec And CrashLoopBackOff — Kubernetes: Production-Grade Container Orchestration
- securityContext: Nonroot, Capabilities And Seccomp — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: NotReady Nodes And kubelet Logs — Kubernetes: Production-Grade Container Orchestration
- Setuid, Setgid, And Root Through sudo — Linux Fundamentals & Systems Administration
- Production Hardening: Graceful Shutdown & Docker — Node.js Internals & Backend Services
- Logins, su, sudo And SSH Between Hosts — Red Hat Certified System Administrator (EX200) Exam Prep
- NFS Client Mounts That Survive The Boot — Red Hat Certified System Administrator (EX200) Exam Prep
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Deploying Files: file, copy, lineinfile And blockinfile — RHCE in Ansible (EX294): Automate Red Hat Systems
- Mock Exam, Part 2: Real Machines And The Patterns That Fail — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- credentials(7): user and group identifiers
- Docker Engine security
- Docker Docs: Dockerfile best practices (USER)
- man7: capabilities(7)
Certification courses
- AWS Cloud Practitioner course and practice exam: CLF-C02
- AWS DevOps Engineer Professional course and practice exam: DOP-C02
- AWS Solutions Architect Associate course and practice exam: SAA-C03
- RHCSA course and practice exam: Red Hat Certified System Administrator (EX200)
- RHCE course and practice exam: Red Hat Certified Engineer in Ansible (EX294)