0

When I run telnetd -l /bin/sh on an embedded Linux device and use Putty to telnet to it, the provided shell is /bin/psh (protected shell).

On this device, /bin/sh is a symbolic link to /bin/busybox.

Where I can see on this system that /bin/sh redirects to /bin/psh?

How can I change it if /bin is read only?

  • Maybe the user's shell is set to /bin/psh in /etc/passwd? – multithr3at3d Jan 26 at 19:18
  • @multithr3at3d no. There is /bin/sh – Meryy Jan 27 at 20:20
0

First you can ask where the shell lies with which sh. The command tells the full path.

Then, you can use ls - al to view whether or not that is a symbolic link on its own or not.

Once you have found the original shell you know whether or not it fits your need.

To change the shell for the user you are using, you have plenty of choices, depending on whether or not you are root. Have a look here to have an idea.

If, instead, you want to change where the symbolic link points, you can you have to be root and use the ln command. Keep in mind that changing the shell in this way can have serious unwanted consequences.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.