I am trying to add a
NOPASSWD entry for
sudotest.sh (or any script/binary that requires sudo) in my
/etc/sudoers file (on Ubuntu 12.04 LTS server), but in order to make it work, I must specify the full path. The following entry works just fine:
The problem is that the script might move to a different directory. This seems like a great chance to use the
* wildcard in the path (i.e.
/*/sudotest.sh) so that my script could be in any directory but the manual states that wildcards will not match the
/ character when used in a path. I've confirmed that it doesn't work.
I know that I can use the word
ALL in place of my script, but this means there is no password prompt for any commands which seems unsafe.
How do I solve this?