There's a
"chroot" command that you could put in /etc/profile and have
it triggered for the users you want to chroot. Bear in mind, however, that a chroot'd environment means that everything is chroot'd -- commands, shared libraries, /etc/resolv.conf, the lot. It's very hard to set up a limited environment (well, it was when I tried it once) -- and even harder to be sure there's nothing in that environment that you wouldn't like. There are other techniques though that give a similar effect that involve programming: you have one process in a chrooted environment that the user runs in and a parent process communicating via a pipe to run limited commands in the normal environment -- a sort of sandbox for Unix. I've not tried this ever and I don't know if there's something out there that will do it for you. jch Do you have some examples of /etc/profile to chroot
a user?
Thanks in advance
|