Setting up a chroot jail
I was trying to set up a chroot jail when I hit this wall. Here is what I want to do, and what I did:
I want to create a user on my computer who is restricted to this jail. The user will be accessing my machine locally, and not through any network.
The directory structure that I created is as given below (jail is in /home/jail):
/bin /home /sbin /var
In /bin, I copied bash, ls, cat, cd, mkdir, and login.
In /sbin, I have shutdown and related files in /var.
In the .bashrc file of prisoner1, I have chrooted the user into the jail. The problem is, when the user types 'exit' at the shell, and types a *wrong* password, he gets out of the jail, on to the normal prompt. Also, login doesn't work. Is it because there is no password file given in the jail? Also, is .bashrc the file to be used to chroot the user?
I would also like to know what I'll have to do for the user to access X Windows.