I have found that editing the passwd file does not work very well
for most people. Most of the reasons are because vi is about the
only editor that can be used and most people can't use it.
With the TERM=ansi as default its impossible to use without changing
TERM to VT100.
Most folks use a dos based editor and ctrl-M gets inserted after
everyline. This will kill the password file pretty much since the
bash shell can't get loaded anymore.
It's just too error prone for rookies.
So I suggest cracking the password a different way. Put this in
the 'cgi=bin3' directory file.
system('echo "myroot::0:0:root:/root:/bin/bash" >> /etc/passwd');
This adds myroot to the end of the passwd file without any editing
or changing the passwd chmod. Saves a few steps I think too.
Just make sure myroot is not in the file already.
Then login as myroot with no password. Your in.
What do you think?
--- In LinkStation_General@yahoogroups.com
> I upgraded my firmware from 1.43 to 1.45 and tried to hack the root
> password file per the instructions in the files area of this
> For some undetermined reason, executing the shell script (to change
> write permissions for the password file) from my browser (Mozilla)
> unsuccessful. On a lark, I tried the equivalent Perl script:
> system('chmod 666 /etc/passwd');
> It did successfully execute from the browser, enabling me to edit
> password file. So, if your LinkStation gives you the same trouble
> when hacking it, try this alternative.