Jail is launched as a login shell for any of the servers that allows
access to the machine from the net, e.g. sshd, telnetd, ftpd, etc. So
Jail is the shell of the chrooted users. To build a chrooted
user, four steps are required:
- Build userís passwd entries in the non-chrooted environment.
- Setup chrooted environment.
- Add the software to the chrooted environment.
- Add the users to the chrooted environment.
The first one is required to allow the user launch jail when a login
process is invoked. The second, three and four steps are required to
built the chrooted enviroment (create the required directories,
copying the library and binary files, changing chrooted /etc/passwd file,
and so on).
So these are the required steps in order to setup jail:
- Setup Entries
- Create directories
- Adding users
- Adding software