You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to validate that sudoers files and its included files have the correct syntax

APPLIES TO:

Oracle Cloud Infrastructure

Linux x86-64

GOAL:

When editing /etc/sudoers file it is recommended to do it with visudo since it validates the syntax for errors that could render sudo unusable. In complex environments it isn’t uncommon to have sudoers rules that are made of several included files and or folders. The goal is to be able to validate all of them in once.

SOLUTION:

To validate a single sudoers file,run command below for the file to check:

$ visudo -f /etc/sudoers 

To validate all of the referenced files in the current system we can use

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!