On one particular machine I often need to run sudo
commands every now and then.I am fine with entering password on sudo
in most of the cases.
However there are three sudo
commands I want to run without entering password:
sudo reboot
sudo shutdown -r now
sudo shutdown -P now
How can I exclude these commands from password protection to sudo
?