Gurus,
I have a 32 bits desktop install of Lucid 10.04.
To save $$$ on my power bill, I want to shutdown my machine every night at 10PM. So I created a CRON job
It does not work. I found no errors (permissions?) in the log file... the machine never shuts down. However, if I do exactly the same thing from the command line, it works!!Code:00 22 * * * /usr/sbin/sudo /sbin/shutdown -h now
After doing some research, I edited my sudoers file thusly
No change. The CRON job does not work, however the command line works just fine.Code:# /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # See the man page for details on how to write a sudoers file. # Defaults env_reset # Host alias specification # User alias specification # Cmnd alias specification Cmnd_Alias USR_CMDS = /sbin/shutdown # User privilege specification root ALL=(ALL) ALL # Allow members of group sudo to execute any command after they have # provided their password # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=(ALL) ALL # #includedir /etc/sudoers.d # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # User Alias specification User_Alias USERS = alberto # User alias specification ALL ALL=(ALL) NOPASSWD: USR_CMDS
What am I missing here? Can someone help? Thank you.
Al.



Adv Reply


Bookmarks