OpenWrt Forum Archive

Topic: WRT54GS: OpenWRT login in failsafe?

The content of this topic has been archived on 28 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

After flashing our WRT54G v2.0 (from original linksys firmware v.2.02.7) to OpenWRT snapshot 20041021 we tried for the first time after flashing to telnet into the device. We flashed the device via the webbased firmware-upgrade page from the original linksys firmware.

It asks for username and password. We tried every combination of root and admin and even with no password. No login is possible.

Every OpenWRT page states that there is no username and password necessary.

Any hints for us to login and continue installing packages?

Thank you very much...

freesol

Hi all

I was fiddling around with OpenWRT on my WRT54GS and was able to succesfully install it.
After playing around with it (and comparing some things between the openwrt and the original interface), I decided to install the latest official firmware (2.09). That all went well.

I got quickly bored by it, so decided to install the latest precompiled snapshot from OpenWRT (snapshot-20041021). After that, the thing doesn't quite work that well anymore. Upon powering up, the thing boots but then simply hangs with the Power LED and DMZ LED on. It doesn't do anything anymore and does not respond to telnet or pings.
Desperately, I booted with failsafe mode (but did not know this would also turn off boot_wait). This works and I can telnet in, but then I get this nasty prompt

OpenWRT login: 

I don't have a password, and logging in with nothing, 'root' and the router password doesn't seem to help.
Anyone got a clue about what that login might be, before I turn to more drastic measures (opening it up).

Thanks

username: root
password: your wrt54g's admin password ( if you changed it from "admin" )

it saves the old password through a re-flash...

try
root
admin
otherwise I'm lost wink

booting into failsafe turns boot_wait off? I don't see what good that could possibly do if it does.

I tried that one already, but it keeps saying it's incorrect.

But when the nvram parameters are all reset, shouldn't the password reset to default as well? (Even if it doesn't, I never changed the admin password.)

EDIT: one other thing: it is said that creating the jffs2 partition takes a long time. During that time, should I be able to telnet/ping the router? And how long should I wait, because maybe there's nothing wrong... (But then again, why can't I login..?)

I'm going to try some things out tomorrow; hopefully nothing drastic (like shorting out things ;-)).

u/p: "root" / "admin" doesn`t work.  I resetet the device before I flashed OpenWRT.

The Linksys login was u/p: "" / "admin".

To make it more clear. The WRT54G has 192.168.1.1, my host 192.168.1.2.   Tried telnet with both: PuTTY and telnet from windows.

Is there a way to flash it again? Or any other hints how to login?


Thanks
freesol

Hi,
it seems we have the same problem with snapshot 20041021 for the wrt-54g. We can´t login per telnet because we don´t know the right combination of username and password.
Our thread:
[https://openwrt.org/forum/viewtopic.php?t=556]

Perhaps it is possible somebody compiled this snapshot with username and password???

bye
freesol[/url]

Wouldn't surprise me.
My first OpenWRT flash was one I compiled myself. It also started with the login prompt. I quickly deactivated it in the source.
But the most problematic issue is that boot_wait has been turned off while trying to boot into failsafe, and now I can't reflash it.
That being said I think the only way is to short out pins and hopefully getting it to enter tftp wait state.

I have exactly the same problem. I flashed OpenWRT on my (second) WRT54G v1 through the Web-Interface of Sveasoft Satori. Before I rechecked that the nvram variable boot_wait is "on".
The Upgrade worked without any problems. I can ping my WRT54G v1 (IP-Address: 192.168.1.2) but when I want to telnet it asked me for username/password.

I tried some combinations as suggested, checked root/admin combination and double checked it.
I used the file openwrt-g-code.bin from snapshot-20041022.tar.bz2

Do you have any tips?

Had same problem with 'snapshot-20041021.tar.bz2' could not login under telnet and also reset button would not work. Thought i had bricked the wrt54g.

Got 'snapshot-20041010.tar.bz2' and loaded it with tftp and with my amazement it load. Log in with telnet, not a problem, does not even ask for login or password.

Now to setup client mode

It sounds to me like you may have accidentally comiled in the BusyBox username and password options.  I don't know exactly where it grabs this info from (either /etc/passwd or /etc/shadow), but if you don't have a passwd file, you're out of luck.

I am in the same boat with my router, and I was dumb and couldn't set the boot_wait to on before flashing.  Now, I have to debrick it.

I hope that your router is not in the same condition.

If you build your own, check under buildroot/build-mipsel/root/bin to see what it is. It should be a shell script wrapper for ash. Otherwise, it would check against /etc/passwd which most likely than not won't have anything and it means there is no way you can get access to the box. Just flash another firmware.

I believe it would be safer in future release to tell the telnetd daemon to run ash rather than the wrapper, just in case the login feature of busybox is turned on accidental, as the telnetd is only used for emergency use only.

That makes sense.  However, it still would be nice to have a passwd file there in the following builds just to resolve this issue.

However, /etc/passwd files are not hard to create. smile

That makes sense.  However, it still would be nice to have a passwd file there in the following builds just to resolve this issue.

However, /etc/passwd files are not hard to create. smile

It would be easier to change the init.d/ script as to have a valid /etc/passwd, one need to create the password hash properly. Though I agree that proper(with entries)  /etc/passwd and /etc/group should be there as many apps expect such a thing, including dropbear. Beside, some daemons need non-root entry too(for downgrade privaledge).

Good news to tell: I can login to my little WRT again. I tried the tipps with pin 15-16, but had some problems because the new firmware didn't flash correctly.
Short story: after flashing the new OpenWRT snapshot snapshot-20041022.tar.bz2 to my WRT54G(v2) I couldn't login via telnet. The standard username/password combination was not accepted ("root/admin"). I didn't changed the password. Anyway... I tried to start the failsafe_mode but this didn't helped me out and as I read in this forum it turns boot_wait to off. So I had to open the little box searched for the Intel Flash with 48 pins (there's a small sticker saying, it's version 2.02.2). After that I turned the power off, start pinging "ping -t 192.168.1.1" on Windows, short cutted pin 15-16 with a screwdriver and turned the power on of the WRT. The power led started to blink and I started to upload an official firmware -> nothing happens.
OK -> I started Linux, turned on tcpdump and realized that there is a transmit error during the firmware upload of the official Firmware Version 3.01.3! ftp://ftp.linksys.com/pub/network/WRT54 … S_code.zip
I used the Linux tftp command and set rexmt 1.

I have no idea why this happens. I uploaded Sveasoft Satori, everything works ok, the power led was blinking for about 1 minute after the upload was completed, the router rebooted and ping 192.168.1.1 worked.

Finished? Not yet, now upload OpenWRT  wink

I used this post http://openwrt.org/forum/viewtopic.php?t=17

More good news  big_smile
After flashing this Satori thing on my innocent wrt box, I downloaded the new snapshot snapshot-20041026 from http://openwrt.org/downloads/snapshots/ … 26.tar.bz2 as described at http://openwrt.org/userguide.html

This time, I didn't use the web-interface of Sveasofts Satori - just turned telnet on, to make "nvram set boot_wait=on; nvram commit; reboot;".
Deafult username/password for Sveasoft telnet login is root/admin. After that I turned the power off, and uploaded the firmware as described in the userguide. "rtfm"  lol

tftp 192.168.1.1
tftp> binary
tftp> rexmt 1
tftp> trace
Packet tracing on.
tftp> put openwrt-g-code.bin

-> know turn the power on and pray...

For those of you who don't have a PC with Linux installed, you can try a Live Linux CD like Knoppix.
http://www.knoppix.org/
-> starts Linux from cd without touching your Windows Installation.

Have just helped a college de-brick his WRT54GS after running into the username/passwd issue. Adding passwd and group files to the buildroot/build_mipsel/root/etc directory didn't help since by this time, firstboot had already been run and there were no links from /etc/passwd to /rom/etc/passwd and from /etc/group to /rom/etc/group.

I finally added a conditional call to firstboot to S10boot when /etc/passwd is missing and reflashed the router, and that helped.

Two suggestions:

1) Add an option to firstboot to *only* make it link any new files in the rom file system, and run that on every boot. That would make it easier to manage customized additions to the rom file system.

2) Add commands to set boot_wait to "on" on every boot. I can hardly imagine anyone not wanting to wait a few extra seconds on boot in exchange for avoiding having to short out pins on the flash chip when something goes wrong.

To fix it quick and dirty you can edit


build_mipsel/root/etc/init.d/S50telnet

to be the following

/usr/sbin/telnetd -l /bin/sh


That will just start a shell as soon as you telnet to the box. Not nice, but it made me happy for now smile

i've tried to modify buildroot/sources/openwrt/root/etc/init.d/S50telnet accroding to frink's instructions and not buildroot/build_mipsel/root/etc/init.d/S50telnet as frink mentionned

I wrongly thought that on the next make the first would replace the second ...

So my question is : what is the "role" of the sources tree if it is not included in the make building process ? historical ?

hint/link/faq ?

i've tried to modify buildroot/sources/openwrt/root/etc/init.d/S50telnet accroding to frink's instructions and not buildroot/build_mipsel/root/etc/init.d/S50telnet as frink mentionned

I wrongly thought that on the next make the first would replace the second ...

So my question is : what is the "role" of the sources tree if it is not included in the make building process ? historical ?

hint/link/faq ?

The whole buildroot is designed for building from SCRATCH to FINISH. What you have done is not the desired usage(rebuilding in the middle). try "rm -rf buildroot/build_mipsel/root", that would build the rootfs based on the new changes in the sources/openwrt/root.

In fact, you can do the same for a number of other things like busybox or uClibc or kernel, just go into  it(under build_mipsel) and "make clean", remove the build_mipsel/root, then make at the top level. This way, you can even change settings for the kernel, uClibc, busybox etc. too as the Makefile rules won't untar from the source again.

Don't blame me if  something is screwed up as I said the only "right" way of building the firmware is from SCRATCH to FINISHnot even stopped in between), what I mentioned are easy hacks to customize the firmware.

Hi,

I ran in the same Problem.

I just done the trick with pin 15 and 16.
I got tftp and somefirmwares.

(Original and other)

I plug in the cable got a ping have entered the tftp commands and I didn't got the firmware to upload.
The red light is flashing.

With tcp dump I always geht an udp crc error.

What have I done wrong? Can someone help me? Do I need a spezial tftp client?

Alex

The discussion might have continued from here.