I’m have a bash script that I run in /etc/crontab on Linux
$ uname -a Linux mymachine.com 3.4.76-65.111.amzn1.x86_64 #1 SMP Tue Jan 14 21:06:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
The bash script contains a line
sudo shutdown -r 5
However, when the cron job runs (as a user named “myuser”), the machine is never rebooted and I instead find this in the logs
[sudo] password for myuser:
What do I need to do to give this user the ability to reboot from cron? It’s not an option to run this script as another user.