I am trying to give sudo ability without the need of passwords to specific files. So far I have:
employee ALL=(ALL:ALL) NOPASSWD: /home/file_name
The file has a simple chmod command, in the bash script it has at the very bottom "sudo chmod ..." and it will prompt me for the password.
I have tried it as:
employee ALL=(ALL:ALL) NOPASSWD: ALL
this will cause it to work, but I only want it to NOT ask for the password for this single file.
Eventually I want to also configure it to use root's password for sudo (I know it's not the most secure thing to do, and is not recommended). I know at that point you will need to enter in Defaults rootpw.
Does anyone know why this isn't working? I'm sure it's something silly.