Results 1 to 7 of 7

Thread: .sh_history is possible to run?

  1. #1

    .sh_history is possible to run?

    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

  2. #2
    history in the busybox shell seems fixed at around the last 10 commands

  3. #3
    ...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.

  4. #4
    Join Date
    Apr 2006
    Location
    Heesch, Netherlands
    Posts
    118
    Quote Originally Posted by wirespot View Post
    ...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?

  5. #5
    Join Date
    Apr 2006
    Location
    Heesch, Netherlands
    Posts
    118
    Solution found:

    echo /opt/bin/bash >> /usr/shells

    To add bash as accepted login shell.

  6. #6
    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

  7. #7
    Join Date
    Apr 2006
    Location
    Heesch, Netherlands
    Posts
    118
    Quote Originally Posted by greengreen View Post
    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)

Similar Threads

  1. [How-To] Install and configure xmail an a wl500g
    By mmX in forum WL-500g/WL-500gx Tutorials
    Replies: 6
    Last Post: 13-03-2009, 14:16
  2. How to run pppoe and dyndns
    By hugo in forum WL-HDD Q&A
    Replies: 4
    Last Post: 05-01-2007, 22:04
  3. Newbie - How to automatically run consolle commands at router startup
    By courghan in forum WL-500g Custom Development
    Replies: 2
    Last Post: 07-01-2006, 13:08
  4. Does any of you have run sqlite successful ?
    By thuyet in forum WL-HDD Custom Development
    Replies: 3
    Last Post: 01-06-2005, 09:23
  5. sshd does not run on 1.7.5.9-5
    By albi in forum WL-500g Custom Development
    Replies: 6
    Last Post: 28-08-2004, 22:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •