Polecenie crona
Polecenie crona
Witam
Próbuję ustawić polecenie w cronie, aby codziennie resetował router TP-LINKa.
Znalazłem w necie iż powinno działać polecenie:
wget -qO- --user=uzytkownik --password=haslo http://192.168.10.207/userRpm/SysReboot ... oot=Reboot > /dev/null
(uzytkownik i haslo to dane logowania do routera)
Niestety to polecenie nie powoduje resetu (brak reakcji routera).
Co jest źle? Czy możliwy jest zdalny reset routera z serwera poprzez wywołanie komendy.
Serwer dla routera jest bramą do internetu.
Dzięki za sugestie.
Pozdrawiam
Kazimierz
Próbuję ustawić polecenie w cronie, aby codziennie resetował router TP-LINKa.
Znalazłem w necie iż powinno działać polecenie:
wget -qO- --user=uzytkownik --password=haslo http://192.168.10.207/userRpm/SysReboot ... oot=Reboot > /dev/null
(uzytkownik i haslo to dane logowania do routera)
Niestety to polecenie nie powoduje resetu (brak reakcji routera).
Co jest źle? Czy możliwy jest zdalny reset routera z serwera poprzez wywołanie komendy.
Serwer dla routera jest bramą do internetu.
Dzięki za sugestie.
Pozdrawiam
Kazimierz
Polecenie zapodane ręcznie (bez /dev/null) w terminalu daje komunikat.
Wynika, że hasło lub nazwa są niewłaściwe. Jednak przy ich użyciu loguję się poprzez stronę internetową bez problemu.
Kod: Zaznacz cały
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Login Incorrect</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE type="text/css">
body, p {
font-family:Arial;
font-size:14px;
line-height:180%;
text-align:left;
}
h1 {
text-align:left;
font-size:30px;
line-height:normal;
color:#0068B1
}
#errorbody {
width:620px;
display:block;
padding-top:5em
}
</STYLE>
</HEAD>
<BODY>
<DIV align="center">
<DIV id="errorbody">
<H1>Username or Password is incorrect.
Please refer to the troubleshooting below:</H1>
<P> <B><FONT size="4">Is the "Caps Lock" enabled on your keyboard?</FONT></B>
The username and password must be lowercase, please ensure that the "Caps Lock" LED is disabled on your keyboard and try again.</P>
<P><B><FONT size="4">Forgot your username or password?</FONT></B>
Please reset the device to the factory default settings if you have forgotten your username or password. The default username and password are both set as <B>"admin"</B>.
<B><FONT color=#ee0000>Note: The settings will be restored to factory default after the resetting.</FONT></B></P>
<P><B><FONT size="4">How to restore the device to the factory default settings?</FONT></B>
Firstly locate the reset button on the rear panel of the unit, whilst the device is powered on press and hold the <B>reset</B> button for more than 5 seconds, the device will then reboot and restore itself to the factory default settings. </P>
</DIV>
</DIV>
</BODY>
</HTML>
A spróbuj:
Kod: Zaznacz cały
http://[B]login[/B]:[B]haslo[/B]@192.168.10.207/userRpm/SysRebootRpm.htm?Reboot=Reboot