history in the busybox shell seems fixed at around the last 10 commands
Hi,
is possible to run shell history for shell sh?
I try create .sh_history in my home directory and I add to my .profile
HISTFILE=/usr/local/root/.sh_history
HISTFILESIZE=500
HISTSIZE=500
but history isn't runing.
Can you someone help me?(or is it possible to run?)
thanks
history in the busybox shell seems fixed at around the last 10 commands
...and it doesn't provide backwards search either (Ctrl+R). Just install bash and use that instead. If you have an external HDD attached it would also be a good idea to move your home dir on it. The default home dir is on the router virtual mem disk and is either lost on every reboot, or you can save it to the flash whenever you remember, but it's a hassle.
I tried this, by doing the following:
change /etc/passwd to:
username:Passwd Hash:0:0:root:/opt/home/username:/opt/bin/bash
And then:
passwd username
During my (putty ssh) session I could use "login username" which logged me in with the correct homedir and shell.
BUT
When I closed the putty session and restarted it I got "Access Denied" after logging in. Using Telnet everything worked out fine.
I also tried to restart dropbear, but no solution.
I didn't flashfs save commit enable and reboot, because I'm afraid of getting locked out.
Can you tell me how you figured this out?
Solution found:
echo /opt/bin/bash >> /usr/shells
To add bash as accepted login shell.
hi,
when I want to change shell sh to bash:
echo /opt/bin/bash >> /usr/shells
change /etc/passwd to:
username:Passwd Hash:0:0:root:/opt/home/username:/opt/bin/bash
After this changes I can't login over ssh.
where is bug?
thanks
Did you also change the homedir, or was it already working on that location?
I copied my homedir to opt (don't forget to use a tool that also copies permissions) before I did that change.
Another thing I did; after changing /etc/passwd I did
passwd username
It looks like the pashword hash is calculated on the complete sentence or something. (just a guess)