After failing to use makejail, I followed a howto for setting up a jail using a script (this one is for Debian etch, but I'm using lenny -- seems to work ok though). However, it gives the user a very limited environment with almost no applications available (e.g. no vim, emacs, cat, tail, etc).
To solve cat and tail I just copied the binaries from
/home/jail/bin (which feels a little wrong). And for the other apps, I just used
mount --bind /usr /home/jail/usr so that the user has access to most stuff (I also had to mount
vim seem to work ok, but I'm not entirely convinced this was the best approach -- is there a more elegant and maintainable approach, or is jailing users generally a huge chore?