To fix the could not open session
problem, without abandoning make_chroot_jail.sh entirely, you also need to copy the /usr/lib/libcrack*
libraries. Edit the script, where it has:
# If you are using a 64 bit system and have strange problems with login comment # the following lines in, perhaps it will work (motto: if you can't find the # needed library just copy all of them) # # cp /lib/*.* $/lib/ # cp /lib/lib64/*.* $/lib/lib64/
Change to:
cp /lib/*.* $/lib/ cp /lib64/*.* $/lib64/ cp -rp /lib64/security $/lib64/ cp /usr/lib64/libcrack* $/usr/lib64/
Just a quick addendum, the above fixed this problem with 64 bit SuSE - SLES 11 sp2. I also renamed the $JAILPATH/lib
to $JAILPATH/lib64
. And for that OS, I had to add an empty /etc/profile file in the jail (you can use it to put in a PS1 prompt).