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.

An overly broad or writable rule gives its users unrestricted root.

In more detail

A rule can let one user run exactly one command as root, such as restarting one service. Edit it only with visudo, which checks the syntax so a mistake cannot lock everyone out. A rule that allows every command as every user is effectively full root access.

Example

Adding a line to /etc/sudoers or a file in /etc/sudoers.d is a classic way to keep administrator access, so audit rules watch both for writes.

Related terms

Taught in

References

Certification courses