2

I am messing around and want to have a guest user whose login shell is a restricted one like rbash. Unfortunately there is no rbash executable anywhere on my Slackware installation, so I have to do bash -r instead.

I tried putting this in /etc/passwd as the login shell for the user in question: guest:x:1001:1001::/home/guest:/bin/bash -r but it seems to be trying to find an executable with " -r" at the end of the filename and so doesn't let me log in because it doesn't exist.

Is there any way I can start a restricted shell with an option like this, or do I have to install an rbash binary? This is not ideal as I am on a Raspberry Pi (ARM) and may have to compile a package which is something I am unfamiliar with.

terdon
  • 234,489
  • 66
  • 447
  • 667
Architect
  • 173
  • 6

1 Answers1

4

All I had to do was create a symlink at /bin/rbash pointing to /bin/bash, and bash must know that is was invoked from a link called rbash and starts itself in restricted mode.

Thanks for your help.

Architect
  • 173
  • 6