jail_user.sh <user> defective

jlixfeld

Verified User
Joined
Jun 1, 2009
Messages
60
Running custombuild 1.2. Trying to setup jailed ssh. Followed the instructions here, but I got a whole slew of errors when trying to jail a user.

Code:
[root@hosting1 custombuild]# ./jail/jail_user.sh broadviewlofts
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/librt.so.1': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/librt.so.1': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/librt.so.1': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/librt.so.1': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/librt.so.1': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libm.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libpthread.so.0': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
cp: cannot stat `/usr/local/directadmin/custombuild/jail/su': No such file or directory
cp: cannot create regular file `/home/broadviewlofts/lib/i686/nosegneg/libc.so.6': No such file or directory
[root@hosting1 custombuild]#

I fixed it by manually copying these files to <jailed_user>/lib/i686/nosegneg/ but I'm wondering if this is a bug that needs to be sorted out or did I do something incorrectly?

Code:
[root@hosting1 new]# cp /lib/i686/nosegneg/libm.so.6 /home/broadviewlofts/lib/i686/nosegneg/
[root@hosting1 new]# cp /lib/i686/nosegneg/librt.so.1 /home/broadviewlofts/lib/i686/nosegneg/
[root@hosting1 new]# cp /lib/i686/nosegneg/libc.so.6 /home/broadviewlofts/lib/i686/nosegneg/
[root@hosting1 new]# cp /lib/i686/nosegneg/libpthread.so.0 /home/broadviewlofts/lib/i686/nosegneg/

Code:
[root@hosting1 new]# uname -a
Linux hosting1.ariohosts.ca 2.6.18-128.1.10.el5.xs5.5.0.51xen #1 SMP Fri May 29 06:29:19 EDT 2009 i686 i686 i386 GNU/Linux
[root@hosting1 new]#

Code:
[root@hosting1 new]# cat /etc/redhat-release 
CentOS release 5.3 (Final)
[root@hosting1 new]#

Thanks in advance.
 
Hello,

The jailed shell script will likely be eternally in beta status due to the complexity of using an OS independant script to copy all required libraries for a proper jail to be created. Operating systems are ever changing with different libraries, new versions, different paths, so having the script stay current isn't too feasable.

However, on a per-system basis server admins can update their own files.list file to include any libraries that their jailed shells need.

cd /usr/local/directadmin/custombuild/jail

and add any missing library paths to the files.list file, so they get copied with the jaill install for each User.

Hope that helps!

John
 
Hello!!!
I'am using my own script to create jail's but i have some problems with homedir rights.
For ssh-chroot we need rights 751 and owner 'root', because with other rights ssh doesn't work. With this rights DA can't create domain and print message:
"You've hit your maximum disk quota and do not have enough space to create another domain"

How we can bypass this restriction?

Custom script "domain_create_pre.sh" runing after message and checking rights.
 
Back
Top