There are two elements to modifying the /etc/sudoers configuration file.
Fail to follow the above warning and you may render your remote machine unmaintainable. (i.e. I’ve failed to follow the above precautions and summarily lost access to the servers)
There’s a reason they built ‘visudo’, use it
Otherwise, you can join me and several others who have locked themselves out of their machines (including ones on another island/continent.)
It’s inconvenient, but not as inconvenient as waiting for the next boat to get to that machine.
Grep /etc/sudoers file for a quick overview of sudo’s current configuration.
$ sudo grep -v "^#" /etc/sudoers | grep -v "^$" | grep -v "^Defaults"
root ALL=(ALL) SETENV: ALL %wheel ALL=(ALL) NOPASSWD: SETENV: ALL
Checked the sudoers file to note who/which groups have access privileges. If the data is a worry, look at what may be wrong.