I've got the following entry in
/etc/sudoers to allow me to run any command after asking for my password
%sudo ALL=(ALL:ALL) ALL
I also want to run a specific command with no password as part of a script. I've tried putting the following line in
/etc/sudoers, but it always asks for a password when I run it.
gmc ALL = NOPASSWD: /sbin/hdparm -C /dev/sdc
Is there a way to have
sudo use the specific command before using the general entry?