Sorry for the slow reply. This account was signed up under my hotmail email (which gets checked about once a month).
Heres the lowdown. What i wanted to do was create a jailed environment for all hosting users on the server. For the jail chroot project to work correctly you need to:
1. create a jail environment
2. add required software to the chroot environment
ie. bash, ls, cp, mv, ... (and the required shared libraries)
3. Add users to this jail
if you are not worried about locking the chrooted users out of each others areas then this is easy. You just create one environment and add everyone to it.
Well on my system i wanted to completely lock users out of system stuff, limit what they could see do, and also kill all possibility of them seeing, viewing, messing with eachothers stuff.
The most straight forward way of doing this would be to create a jail enviroment and add the software/libraries to it for each user. However, I was aiming to provide an extensive set of command line tools to the users so this would have amounted to around 500mb-1gb per user. That was too much disk space... and imagine maintaining that.
What i did to solve this problem was as follows:
1. Setup one jailed environment (/var/jail)
2. Added all required software to the environment (addjailsw i think... but sometimes this failed and i was forced to manually copy executables and required libraries to the appropriate locations)
now here where it got tricky...
3. Create a jail environment for each user on the system
4. hard linked the jailed environment to a hidden folder in each of the users home directories ("/home/joeschmoe/.jail") with mount -ro (read only)
5. created a file called rc.jails that contains these mounts
6. call this file from rc.local so it will load and remount everything on boot
now we have the basic structure setup.. lets give them transparent access to these files.
7. symlink all folders to their proper filesystem names for each user. like /home/joeschmoe/var --> /home/joeschmoe/.jail/var and so on for each of the required file system folders (/var, /usr, /local, /lib,...)
Now, assuming that you have all the required libraries in place and a copy of bash at /bin/bash for each user (/home/joeschmoe/.jail/bin/bash and the /bin symlink) you should be able to login without a problem.
Thats the jist of it. Hopefully that works for you.
If you have any questions post a reply and i'll remember to check my hotmail