visudo
The command that edits sudoers files safely and, with -c, checks that every sudoers file parses.
In more detail
A syntax error in a sudoers file can stop sudo working entirely, so check after every change. visudo -f edits a drop-in in /etc/sudoers.d.
Example
visudo -cRelated terms
- sudoers file — The configuration file, /etc/sudoers plus files in /etc/sudoers.d, that says who may run which commands as which user through sudo.
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
Taught in
- Privileged Access: sudo Rules In Drop-In Files — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: People, Packages And Time — Red Hat Certified System Administrator (EX200) Exam Prep
- Who Wrote That Sudoers File? The Journal, rsyslog, logrotate And auditd — CompTIA Linux+ (XK0-006) Exam Prep
- The Pager Command That Opened A Root Shell: sudo, su And Least Privilege — CompTIA Linux+ (XK0-006) Exam Prep
- Three PBQs Against The Clock: A Performance-Based Mock On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- Exam Strategy: The First Fifteen Minutes And ansible-doc — RHCE in Ansible (EX294): Automate Red Hat Systems
- Privilege Escalation: sudo Rules And become — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: People, Passwords And sudo From The Vault — 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