PDA

Bekijk de volledige versie : /etc/passwd problem



trogdorix
24-01-2007, 01:23
after installing the custom firmware, i followed kfurge's instructions saying

"Modify /etc/passed to make /opt/bin/bash your login shell and /opt/home/<username> your home directory (vi /etc/passwd)"

neither vi nor nano worked very well from the telnet session, and i somehow messed up etc/passwd so that when i try to log in via telnet, i get

"(none) login: root

login: cannot run /bin/sh : No such file or directory

Connection to host lost"



any advice?

trogdorix
06-02-2007, 03:22
in hopes that someone can help, but didnt notice this post as far down on the list as it was, i'm replying to myself to bump the post up the list

kfurge
07-02-2007, 03:11
You might try temporarialy switching from user based access mode (UBSA) to password based access mode (PBSA) then restart the router. Get there via Advanced Settings -> Share Management -> Windows Setting.

I believe that when the router is in PBSA mode it uses a temporary password in /tmp/passwd which is created fresh during boot-up. This should allow you back in to fix or delete your old passwd file.

Be aware, though, there are some threads that indicate switching modes like this can mess up your router enough to require a complete wipe of nvram. Details on how to do this can be found on this forum.

- K.C.

trogdorix
10-02-2007, 03:39
switching access modes worked perfectly.
i found a freeware telnet client that works with vi and nano much better than XP's built in one, and everything is working now.


Thanks, kfurge!

nap
29-04-2007, 21:29
For me switching access modes worked well too.

editing /etc/passwd with nano not with vi caused the error at the root login.

mistraller
01-05-2007, 09:44
For me switching access modes worked well too.

editing /etc/passwd with nano not with vi caused the error at the root login.

You should use nano with -m option t avoid word-wrap issues.