Creating chroot or jail shell environment

Jail Shell

  • Jail shell is another term of chrooting the directory.
  • Jail shell is good for large userspace management on system administration.
  • Jail shell has jail home directory. For example : /home/mmlt
  • A process or user under jail directory never go beyond of unix sep limit dir/./ which including SFTP.
  • Jailkit is so far, the best utility for jailing userspace.

Create Jail Realm

Assume we have a large user group called MMLT and using Jailkit to create Jail Realm environment as followed.

  • Username : mmlt
  • Groupname : mmlt
  • Jailed home dir : /home/mmlt

Let’s Jail User

  • Now we have created MMLT jail environment. So, let add the user(s) to chrooted/jail environment.

Adding New User

Adding Password for New User

Adding MMLT Group

  • Optional

Adding MMLT jail shell

Editing passwd

  • jk_jailuser utility already made this, check first. If not so, vi to change as follow.

change

to

Entering to jail home

Editing passwd for jail home

change

to

Related Articles