Restricted Shell

Hi all,

is there a package like rbash for NixOS?

Or some other neat way to do this?

Thanks,

John

bash -r/bash --restricted seem to work, what else do you need?

1 Like

oh great, somehow I thought I needed a whole package. thanks!

If you want to use rbash command, then the following package might help you:

runCommandNoCC "rbash-${bashInteractive.version}" { } ''
  mkdir -p $out/bin
  ln -s ${bashInteractive}/bin/bash $out/bin/rbash
''
2 Likes