I would like to execute something like rtcwake -m off -s 60 without entering a password.I used visudo to write the following line into /etc/sudoers:%sudo ALL = NOPASSWD: /sbin/shutdown, /sbin/poweroff, /sbin/halt, /sbin/rebootNow I can shutdown without entering a password. However, using rtcwake without password does not work. Instead, I get the following message:rtcwake: assuming RTC uses UTC ...rtcwake: wakeup from off using /dev/rtc0 at Fri Dec 18 17:45:43 2015shutdown: Need to be rootWhat is missing?
Use rtcwake without entering a password
sudo;shutdown
Got it. I added the following line to /etc/rc.local:sudo chmod ugo+r rtc0and with%sudo ALL = NOPASSWD: /sbin/shutdown, /sbin/poweroff, /usr/sbin/rtcwakein /etc/sudoers. Note that I do not care about security because my application is running on a dedicated computer which does not run critical tasks.edit: included /usr/sbin/rtcwake in /etc/sudoers according to Gilles answer.