NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
UberNewf
Apr 14, 2008Aspirant
Newbie question: Remote Shutdown...
I run Windows OS on all my machines. I'd like to be able to dbl-click an icon to remote shutdown my ReadyNas x6, with a simple "Are you sure?" prompt. This will save me having to log into the (slow) UI on the NAS.
This post suggests to me that it's possible, but I don't have clue 1 how to get started. :-) Any help greatly appreciated.
This post suggests to me that it's possible, but I don't have clue 1 how to get started. :-) Any help greatly appreciated.
11 Replies
Replies have been turned off for this discussion
- chirpaLuminaryGet curl for Windows, then make a batch/cmd file to run a curl line that will trigger a shutdown.
Curl-win32: http://curl.haxx.se/latest.cgi?curl=win32-ssl-sspi
Remote Shutdown a ReadyNAS: viewtopic.php?p=94750#p94750 - UberNewfAspirantThat's great - thanks!
Not really a developer question as a follow-up, but along the same topic... how would one shutdown the NAS safely via the power button? Can you? I checked the user guide but the only mention of shutdown was in relation to the web UI. I'd like to not have to boot a PC just to shut down the NAS. - chirpaLuminaryIf you hold down the power button for 5 seconds it will perform a safe shutdown.
- UberNewfAspirantExcellent! Thanks very much... again.
- chirpaLuminaryUber, just a tip too,
The shutdown question was in our FAQ as well, forgot about that,
faq.php#How_can_I_properly_shutdown_the_ReadyNAS%3F
It is always good to read over the FAQ contents, it is a good resource of tips and troubleshooting steps. - freewunsAspirantHi Guys,
Trying to figure this Curl out. Downloaded as per the link but trying to find the installation instructions seems elusive. I want to do an unattended shut down of an NVX by an XP machine on the network, and from what I read, Curl is what I need. The unattended shutdown will only be initiated under certain conditions by the XP machine so using the NVX power schedule is no good.
Any tips on installation etc of the linked software would be much appreciated.
Thanks :D - airwoflAspirantNot sure if this will help, but take a look at the Tamper Data add on within Firefox. This should get you what you need. I have pulled the below from Frontview within RAIDiator 4.1.6. I have NOT tested it by sending a POST back via CURL (I don't have the time) and there's no guarantee it will work in future versions of RAIDiator.
Shutdown & Reboot only:
https://<your address>/get_handler?PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option2=1&command=reboot&OPERATION=set
Shutdown & Turnoff only:
https://<your address>/get_handler?PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option1=1&command=poweroff&OPERATION=set
If you want a Forced filesystem check, add to the URL (don't forget a leading & as it's a new variable):
force_fsck=1
If you want a Quota check, add to the URL (don't forget a leading & as it's a new variable):
force_quotacheck=1
When using the final URL you want in CURL, make sure you POST it as get_handler probably responds differently to GETs and POSTs, as well as ensuring the user credentials are hardcoded in the command line - hope you're ok with the username and password being hardcoded / visible to people. - freewunsAspirantThanks for that......I pasted the shutdown and turnoff only command (with my IP) into address bar of Internet Explorer and it requested my username and password. When I entered UN & PW browser window returned the following and the NAS shutdown.
<?xml version="1.0" encoding="UTF-8" ?>
- <payload>
<status>success</status>
<debug />
- <log_alerts>
<message>Please close this browser session and use RAIDar to reconnect to the device after it is powered back on. System powering off... [Tue Aug 25 08:48:40 EST 2009]</message>
</log_alerts>
- <normal_alerts>
<message>NO_ALERTS</message>
</normal_alerts>
</payload>
I am a mega newb at this stuff and you pretty much lost me at "Tamper Data" lol I need to run this from a batch file on the XP machine if at all possible with no user input.
Thanks hearps for your time. - airwoflAspirantRighty - so it works then! Didn't think it would via a GET but who knew....
I trust you have CURL installed for Windows and when you run it, you get:H:\>curl
curl: try 'curl --help' or 'curl --manual' for more information
If you get a 'cannot find libeay32.dll' mesage, you need to get the compiled OpenSSL libraries installed from http://www.slproweb.com/products/Win32OpenSSL.html.
I will admit that I was tempted to write back that you need to read the --help and do a bit of Googling because it is quite easy from here but the command line that should work for a shutdown and reboot is below - to get the shutdown working or put in the filesystem / quota check, just update the content within the -d switch with & as your parameter separator - see my previous post):curl -d "PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option2=1&command=reboot&OPERATION=set" -k -u admin:<your admin password> https://<your address here>/get_handler
The -k switch is important so it doesn't try and compare the SSL certificate on the ReadyNAS to trusted lists (which you won't have). - freewunsAspirantThanks heaps.....just downloading curl and will get right into it! :D
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!