For example, I want to allow
sudo shutdown -c to always be run without entering a password, but
sudo shutdown without
-c to always require a password (even if I've authenticated to
To change your sudo configuration you need to edit you /etc/sudoers file by using visudo (Only use this because it has validation included. If you don't know how to use vi here are the quick basics you need to edit the file). To allow certain parameters there is an answer here. So you would basically add something like
to the file to allow all users to excecute
this is not command specific (sorry couldn't find anything better) but will ask for a password for all commands that need one to execute (ie there is no
For more details on what you can do with your sudoers file see the official page.