Fixes to mkchroot.sh for Ubuntu 12.04.2 LTS precise 64-bit
Brought to you by:
xystrus
From: Gary B. <rss...@ad...> - 2013-03-12 15:52:10
|
I installed rssh from packages, and used the mkchroot.sh script to create a chroot jail for a user. The script threw up errors, and when I tried to connect, I got the "Connection closed" message. The FAQ says: "However it seems that on recent Linux distros, the script is missing something important, and I haven't yet figured out what that is... If you are able to identify it, please post to the mailing list to let me (and everyone else) know." So, to get it to work, I altered the lines that referred to libnss file to change /lib/ to /lib/x86_64-linux-gnu/ Here's a simple diff: $ diff mkchroot.sh.orig mkchroot.sh 151c151 < /lib/libnss_compat* /lib/libnss_files*; do --- > /lib/x86_64-linux-gnu/libnss_compat* /lib/x86_64-linux-gnu/libnss_files*; do 164c164 < tar -cf - /lib/libnss_compat* /lib/libnss_files* | tar -C "$jail_dir" -xvf - |sed 's/^/\t/' --- > tar -cf - /lib/x86_64-linux-gnu/libnss_compat* /lib/x86_64-linux-gnu/libnss_files* | tar -C "$jail_dir" -xvf - |sed 's/^/\t/' Gaz |