I want my user 'dave' to be able to run a bash script without entering a password, so the script can run with crontab? For all other activities I'd like this user to be required to enter a password (as default). I know this can be accomplished via visudo, but I'm unable to get it to work. Wrong syntax maybe?
My Visudo Entry:
dave ALL=(ALL) ALL
dave ALL=NOPASSWD: /home/dave/thescript.sh
This works in the command line, I can execute it without entering a password. But the cron is returning [sudo] password for dave:
My crontab for user 'dave' is:
0 * * * * /home/dave/thescript.sh
Many thanks,
Ross
sudo
?thescript.sh
contains a line with sudo...