cron job to "self restart server"

Greetings experts,

I am not familiar with Linux, and think this is a pretty easy question for someone who is familiar.

I have this cron job running: /sbin/shutdown -r now
59 23 1 * *

I get this email notification error:
shutdown: you must be root to do that!

How do I resolve this?
LVL 8
pzozulkaAsked:
Who is Participating?
 
Kent OlsenConnect With a Mentor Data Warehouse Architect / DBACommented:
Hi prozulka,

The job must re run as root.  Either enter the job into cron as the root user, or use sudo to have the job become root.


Good Luck,
Kent
0
 
ai_ja_naiConnect With a Mentor Commented:
or use setuid, as root, to allow normal users to perform that command
0
 
pzozulkaAuthor Commented:
It makes sense to log in as root and do this, but I am setting up the job in PLESK. Do I have any control over any of these suggestions from PLESK?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
ai_ja_naiCommented:
If you have enabled root access you can login to your Plesk ControlPanel using the username root and the password you created
http://kb.mediatemple.net/questions/923/Using+root+login+with+Plesk
0
 
pzozulkaAuthor Commented:
I only have the default ADMIN password that comes with the dedicated Virtual Machine at GoDaddy. When I use "/sbin/shutdown -r now" am I emplying to shutdown the entire server itself, maybe that is why its not allowing me to do that?

I'm trying to restart only the virtual machine that we have. I guess I don't have root password, only the Admin default login.
0
 
ai_ja_naiCommented:
Isn't PLESK a virtualized host? You should be jailed inside a VM, so that you can mess around as much as you want.. or am I wrong?
0
 
pzozulkaAuthor Commented:
It is indeed. It is a virtual control panel. Also, the owner of that cron job has full permissions setup in Plesk.
0
 
ai_ja_naiCommented:
I don't understand. Within a vm you should have the freedom of rebooting it, am I wrong?
0
 
pzozulkaAuthor Commented:
Yeah I should be. I guess I don't have the permissions to on that account. Is there a line I could insert after the CRON similar as the Windows RUN AS?
0
All Courses

From novice to tech pro — start learning today.