I applied all the recommendations as described and the telnet does not works !
Enabling telnet access is really easy thanks to the crappy software Asus made for this router. They actually share a web directory with executable CGI scripts - what we'll do is simply edit one of them to run the telnet server (or any other command we want).
Open (through FTP, SMB, NFS, doesn't matter) the files shares/MYSHARE1/web/Layout_English/index.cgi
As the very last line of the file, add:
/apps/bin/utelnetd -d
Save the file back to its original location, and go to the webpage you just changed:
http://192.168.1.1:8081/Layout/index.cgi
If instead of the regular page you see the contents of the file you just changed, it means the file was saved with the wrong permissions. Open an FTP connection to that directory, and use the following FTP command to change its permissions (how to do that depends on your FTP application):
CHMOD 0777 index.cgi
(which gives execute permission on the file)
and then try going to the above URL again. The page will show up as usual, but it also started the telnet server as a daemon. Just open a telnet connection to the router, and you'll be automagically logged in as root.
This was tested with firmware 1.0.4.6.
I applied all the recommendations as described and the telnet does not works !
I don't get it...
I've use kfurge's custom firmware and screwed up. To fix everything, I need to telnet to the router again. So I placed back the originale 1.4.6 firmware from Asus.
I have done the steps above 1000 times. I do not use any quotes (' " or `).. I do see the text-page when permissions are wrong. But then I chmod 777 (using smartftp).. and go to the webpage again. Then I see this:
Using /bin/utelnetd -d or /apps/bin/utelnetd -d makes no difference.. what is wrong here?Code:500 Internal Error There was an unusual problem serving the requested URL '/Layout/index.cgi'. thttpd/2.25b 29dec2003
Fixed!
Ofcourse Windows was the problem again.. Make sure index.cgi is NOT in dos-formate (use unix2dos!)
Last edited by BarBaar; 13-01-2007 at 17:58.
Cool, it works!!! Does this setting stick or we need to open the page to start it after every power-cycle?
After tons of pain yesterday I did get this to work. Here are some additional hints:
1. I found that FTP'ing a file onto the router doesn't work as the FTP server seems to reject site commands for CHMOD. I would definitely recommend mounting the share and editing an existing cgi as described. This will maintain the existing file permissions. If you see the CGI file contents in your browser, or get a "not world executable error" then you have the wrong file permissions.
2. Use an editor that can save the file in Unix text file format. I was using VIM on my PC to edit the file but by default it was saving in Windows format. The CGI would not run and I was getting the "There was an unusual problem serving the requested URL" error. I manually changed VIM to Unix mode and everything started to work.
3. Leave the web page loading as long as you need telnet running. Stop the web page loading and telnet stop running as well.
It took me hours but in the end I figured it out :-)
Hacksaw.
Last edited by Hacksaw; 21-04-2007 at 16:53.
The strange thing is that one day, for no particular reason, the html page I edited just changed back? Does the router check for changes and overwrites them from ROM?
I Have a Problem
When open my page http://192.168.1.1:8081/Layout/index.cgi
Than i get the msg on the bottom of the page:
/apps/bin/utelnetd: invalid option -- Usage: telnetd [-p port] [-i interface] [-l loginprogram] [-d] -p port specify the tcp port to connect to -i interface specify the network interface to listen on (default: all interfaces) -l loginprogram program started by the server -d daemonize
when connect to over telnet i get a failure
telnet:
open 192.168.1.1
Verbindungsaufbau zu 192.168.1.1...Es konnte keine Verbindung mit dem Host hergestellt werden, auf Port 23: Verbinden fehlgeschlagen
Microsoft Telnet>
pls help
thx !
I am running firmware 1.0.7.8, and I don't have to do anything special to get telnet:
telnet <wl-700ge ip address>
just worked!