OpenWrt Forum Archive

Topic: passwd does not work

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

I installed OpenWRT openwrt-wrt54g-squashfs.bin on my WRT54G Saturday.

I have telnet'd and tried to use the GUI and cannot change the root password. If I telnet and do passwd, it tells me that it cannot complete it. If I do it by GUI, the router locks up. I have even tried in failsafe mode.

I am not able to TFTP to the router now to replace it with another image.

It's pretty much a brick at this point as it will not do anything... like route, serve wireless, etc. Holding down the reset button for 30 seconds does not bring up the Linksys management screen. PLEASE help.

root@(none):/# passwd
Changing password for root
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
Enter new password:
Re-enter new password:
passwd: An error occurred updating the password file.

root@(none):/#

(Last edited by jhsands on 26 Mar 2007, 15:42)

Looks like you root filesystem is not writeable or something... can you post the
output of the "mount" command? On my RC6 this looks like this:

/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
none on /tmp type tmpfs (rw,nosuid,nodev)
/dev/mtdblock/4 on /jffs type jffs2 (rw)
/jffs on / type mini_fo (rw)
none on /dev/pts type devpts (rw)

dude

(Last edited by thedude on 26 Mar 2007, 19:06)

root@(none):/# mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
none on /tmp type tmpfs (rw)
root@(none):/#

Part2: I cannot backup the firmware:

root@(none):/# dd if=/dev/mtdblock/1 > /tmp/wrt-linux.trx
dd: standard output: No space left on device

As you can see in your mount output, your root filesystem (/) is read only.
Therefor you can't create anything on it - that's why all the commands that
want to write there will fail to do so.

It looks like the jffs partition didn't get created during the first bootup.

You may try to run the firstboot script again.

http://wiki.openwrt.org/OpenWrtDocs/Usi … a7178e8e28

Mabye this helps. But don't blame me if things get worse. ;-)

dude

(Last edited by thedude on 26 Mar 2007, 19:17)

Thanks, I will try that!

How about an RTFM on how to put the Linksys firmware back on so I can serve internet to the apartments beside me again smile

As you can't save anything on the device (read: no firmware image either - so mtd seems not to be an option) i think you have
to go by tftp:

http://wiki.openwrt.org/OpenWrtDocs/Ins … WrtViaTftp

PS: Make shure that boot_wait=on ...

hth
dude

(Last edited by thedude on 26 Mar 2007, 20:08)

TFTP does not work... that is my whole problem... and I cannot find it on the system to enable it! If I can get TFTP on there... AND working... I think my problem would be solved.

WRT54G 6.0
Broadcom 5352 @ 200MHz
2MB / 8MB

You don't need to enable it on the system. The Linksys should listen to TFTP after power on (assumig boot_wait=1):

From http://wiki.openwrt.org/OpenWrtDocs/Ins … ction=show :

# unplug the power to your router
# start your tftp client

    * give it the router's address (usually 192.168.1.1)
    * set mode to octet/binary
    * tell the client to resend the file, until it succeeds.
    * put the file

# plug your router, while having the tftp client running and constantly probing for a connection
# the tftp client will receive an ack from the bootloader and starts sending the firmware

dude

OpenWrt doesn't work very well on 2Mb devices.
There is a "micro" version that run but many functions are stripped, no pppoe support.
You can build your own image with ImageBuilder package on linux ...
I have made some customized images but all has some problems because memory is fully too fast ...
An alternative is to use a dd-wrt micro (do not slap me ^^) ...

If anyone has any solutions to improve OpenWrt's 2M support I'd love to hear them. It really boils down to the fact 2M just isn't much room to work with and many features need to be stripped out. I don't consider other distributions to be any better in this regard.

I did the ping as stated... the ping does not start until the router is already fully up.

root@OpenWrt:/# nvram show
boot_wait=on

Hmmm.

According to http://wiki.openwrt.org/OpenWrtDocs/Har … sys/WRT54G your unit came with VxWorks and does not have
the CFE bootloader on it. That means you can't use the tftp feature as fas as i understand. In the above document is a link to instructions
on how to install dd-wrt on a unit like yours - but as you now flashed a version of openwrt which denies any write access to the device and
you have no CFE boot loader to use the tftp load during boot up - i don't see a way to reflash your unit. Right?! Anyway...

Maybe JTAG is an option but that's far beyond my skills and involves some hardware mods i think. Ah buying an GL version is an option too... ;-)

EDIT: Just had another idea... would it be possible to to trick the unit and wget an firmware image on /tmp and then use mtd to flash it?
You wrote that you can't backup yout firmware because /tmp has not enough space. How much space is there. Is it writeable?

bye
dude

(Last edited by thedude on 27 Mar 2007, 23:34)

The process of loading anything other than vxworks on a 2M router involves loading CFE, even though that's usually not clearly stated. You don't have enough ram to download a firmware image to /tmp, but mtd can be used with stdin if you want to pipe the firmware to it.

As for the tftp thing, OpenWrt does not run a tftp server, CFE should run one if boot_wait is on but I'm unclear as to what address that version of CFE uses for it. It's possible that you had the right ip address but the wrong mac address cached in your arp table.

PS. I hate 2M routers and this thread illustrates why.

I googled for stdin and all I got was some programming gibberish. Care to elaborate?

Hi Folks!

My passwd failt when i tried to change the root password after flashing. After typing in the new password an error happend.

passwd: cannot update password file /etc/passwd

When i tried to edit it whith vi it says, that its read only.

ls -l /etc/passwd shows:
-rw-r--r--  1 root   root   74 Mar 27 2007 /etc/passwd

I tried to change the permission before makeing the *.trx, but nothing changed.

I´m using Kamikaze 6722 and a WL700ge.

Can anyone help me.

the 8mb ram would bother me more then the 2mb flash.. 2mb is enough for a cusom image that does something like routing, but 8mb is barely enough to run linux properly, and is much less efficient to expand over the network or external device (swap) then storage

I have a similar problem - good start to using OpenWRT!!!
I have a WRT54G v4, and used the Linksys web GUI to update the firmware with openwrt-wrt54g-squashfs.bin (white russian V6). The router rebooted and seems to function as a basic router. I can telnet to it but if I run passwd, enter a new password twice, then it just sits there. The output of the mount command is this...

/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
none on /tmp type tmpfs (rw,nosuid,nodev)
/jffs on / type mini_fo (rw)
none on /dev/pts type devpts (rw)

From thedude's posting on 2007-03-26 14:45:29 it appears that I'm missing a line - "/dev/mtdblock/4 on /jffs type jffs2 (rw)". I have to admit I'm a Window's developer and this does not mean a great deal to me.

I tried running th efirstboot script too (just typed firstboot), but this did not get very far before going no further as passwd does.
root@OpenWrt:/# firstboot
Unlocking OpenWrt ...
Erasing OpenWrt ...
(wait forever at this point)

Does anyone have any suggestions as where to go from here? Is there a version of tftp that runs on XP I can use to try and flash another version? (the tftp that comes with XP does not have a retry option)

Thanks in advance
Bill

The discussion might have continued from here.