Sudo

This page is in help of those who need help setting and configuring sudo.

Things you should know before getting started
You can not edit /etc/sudoers using vim, or any text editor in that matter. You will have to use the command visudo to do that. The same doesn't apply for the files in /etc/sudoeors.d.

When changing settings it's recommended to add custom files in /etc/sudoers.d, the name doesn't matter much. This will ensure that the changes you've made are not lost on upgrading the sudo package.

Setup access
To allow all members of the sudo group to use the sudo command you can uncomment or add the following to sudoers configuration file: %sudo  ALL=(ALL) ALL If the user is not in the sudo group you can add them with the following command: usermod -a -G sudo joe And logout for the changes to take effect.

Setup PATH
To fix sudo not finding binaries in /sbin and /usr/sbin add the following to  with the following line to a sudo configuration file: Defaults   secure_path = /sbin:/bin:/usr/sbin:/usr/bin

Beware that this is not done by default for security reasons.