Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 672 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 672 Bytes

Jail Shells

Various shell scripts to prepare an environment to mainly use unshare with chroot to create jails for different *nix based OSes.

Overall Approach

  1. Get paths to allowed commands.
  2. Copy the commands locally.
  3. Copy dependencies for the commands locally.
  4. Create any symlinks that might be needed.
  5. Depending on OS either:
    1. unshare -r chroot . bin/sh
    2. sudo -r chroot . bin/sh

The primary reason for these scripts was to create shells where users couldn't shoot themselves in the foot when learning to use the CLI. All the scripts are similar and vary depending on the nuances of the target OS and contain comments to reflect that.