Hi - I'm using dapper (amd64) - and having big problems.
here is my setup (I have created my chroot dir in /usr/local as I'd like to keep the /home dir mounted with noexec):
Code:
/usr/local/chroot:
total 20
drwxr-xr-x 2 root root 4096 2007-05-17 06:25 dev
drwxr-xr-x 2 root root 4096 2007-05-16 13:06 etc
drwxr-xr-x 3 root root 4096 2007-05-16 13:09 home
drwxr-xr-x 2 root root 4096 2007-05-16 13:07 lib
drwxr-xr-x 4 root root 4096 2007-05-16 13:06 usr
/usr/local/chroot/dev:
total 0
srw-rw-rw- 1 root root 0 2007-05-17 06:25 log
crw-rw-rw- 1 root root 1, 3 2007-05-16 13:11 null
/usr/local/chroot/etc:
total 40
-rw-r--r-- 1 root root 27266 2007-05-16 13:06 ld.so.cache
-rw-r--r-- 1 root root 195 2007-05-16 13:06 ld.so.conf
-rw-r--r-- 1 root root 470 2007-05-16 13:06 nsswitch.conf
-rw-r--r-- 1 root root 1303 2007-05-17 11:03 passwd
/usr/local/chroot/home:
total 4
drwxr-xr-x 2 cheers cheers 4096 2007-05-16 13:09 cheers
/usr/local/chroot/home/cheers:
total 0
/usr/local/chroot/lib:
total 1940
-rwxr-xr-x 1 root root 92868 2007-05-16 13:07 ld-linux.so.2
-rw-r--r-- 1 root root 8040 2007-05-16 13:06 libcom_err.so.2
-rw-r--r-- 1 root root 20376 2007-05-16 13:06 libcrypt.so.1
-rwxr-xr-x 1 root root 1267512 2007-05-16 13:06 libc.so.6
-rw-r--r-- 1 root root 10056 2007-05-16 13:06 libdl.so.2
-rw-r--r-- 1 root root 83424 2007-05-16 13:06 libnsl.so.1
-rw-r--r-- 1 root root 36112 2007-05-16 13:07 libnss_compat.so.2
-rw-r--r-- 1 root root 44056 2007-05-16 13:08 libnss_files-2.3.6.so
lrwxrwxrwx 1 root root 21 2007-05-16 13:06 libnss_files.so.2 -> libnss_files-2.3.6.so
-rw-r--r-- 1 root root 75288 2007-05-16 13:06 libresolv.so.2
-rw-r--r-- 1 root root 82624 2007-05-16 13:06 libselinux.so.1
-rw-r--r-- 1 root root 212376 2007-05-16 13:06 libsepol.so.1
-rw-r--r-- 1 root root 9864 2007-05-16 13:06 libutil.so.1
/usr/local/chroot/usr:
total 8
drwxr-xr-x 2 root root 4096 2007-05-16 13:06 bin
drwxr-xr-x 4 root root 4096 2007-05-17 10:55 lib
/usr/local/chroot/usr/bin:
total 64
-rwxr-xr-x 1 root root 24096 2007-05-16 13:06 rssh
-rwxr-xr-x 1 root root 40752 2007-05-16 13:06 scp
/usr/local/chroot/usr/lib:
total 2400
-rw-r--r-- 1 root root 1495336 2007-05-16 13:06 libcrypto.so.0.9.8
-rw-r--r-- 1 root root 120064 2007-05-16 13:06 libgssapi_krb5.so.2
-rw-r--r-- 1 root root 150552 2007-05-16 13:06 libk5crypto.so.3
-rw-r--r-- 1 root root 548448 2007-05-16 13:06 libkrb5.so.3
-rw-r--r-- 1 root root 15792 2007-05-16 13:06 libkrb5support.so.0
-rw-r--r-- 1 root root 89512 2007-05-16 13:06 libz.so.1
drwxr-xr-x 2 root root 4096 2007-05-16 13:06 openssh
drwxr-xr-x 2 root root 4096 2007-05-16 13:06 rssh
lrwxrwxrwx 1 root root 45 2007-05-17 10:55 sftp-server -> /usr/local/chroot/usr/lib/openssh/sftp-server
/usr/local/chroot/usr/lib/openssh:
total 40
-rwxr-xr-x 1 root root 36992 2007-05-16 13:06 sftp-server
/usr/local/chroot/usr/lib/rssh:
total 24
-rwsr-xr-x 1 root root 23624 2007-05-16 13:06 rssh_chroot_helper
I get connection closed when trying with sftp or scp. As far as I can see the 2 files mentioned below are present and executable!?
Code:
May 17 11:18:41 delia rssh[8474]: setting log facility to LOG_USER
May 17 11:18:41 delia rssh[8474]: allowing scp to all users
May 17 11:18:41 delia rssh[8474]: allowing sftp to all users
May 17 11:18:41 delia rssh[8474]: setting umask to 022
May 17 11:18:41 delia rssh[8474]: chrooting all users to /usr/local/chroot
May 17 11:18:41 delia rssh[8474]: chroot cmd line: /usr/lib/rssh/rssh_chroot_helper 1 "scp -t me.txt"
May 17 11:18:41 delia rssh_chroot_helper[8474]: new session for cheers, UID=1005
May 17 11:18:41 delia rssh_chroot_helper[8474]: user's home dir is /usr/local/chroot/home/cheers
May 17 11:18:41 delia rssh_chroot_helper[8474]: chrooted to /usr/local/chroot
May 17 11:18:41 delia rssh_chroot_helper[8474]: changing working directory to /home/cheers (inside jail)
May 17 11:18:41 delia rssh_chroot_helper[8474]: execv() failed, /usr/bin/scp: No such file or directory
or :
Code:
May 17 11:12:02 delia rssh[8401]: allowing scp to all users
May 17 11:12:02 delia rssh[8401]: allowing sftp to all users
May 17 11:12:02 delia rssh[8401]: setting umask to 022
May 17 11:12:02 delia rssh[8401]: chrooting all users to /usr/local/chroot
May 17 11:12:02 delia rssh[8401]: chroot cmd line: /usr/lib/rssh/rssh_chroot_helper 2 "/usr/lib/openssh/sftp-server"
May 17 11:12:02 delia rssh_chroot_helper[8401]: new session for cheers, UID=1005
May 17 11:12:02 delia rssh_chroot_helper[8401]: user's home dir is /usr/local/chroot/home/cheers
May 17 11:12:02 delia rssh_chroot_helper[8401]: chrooted to /usr/local/chroot
May 17 11:12:02 delia rssh_chroot_helper[8401]: changing working directory to /home/cheers (inside jail)
May 17 11:12:02 delia rssh_chroot_helper[8401]: execv() failed, /usr/lib/openssh/sftp-server: No such file or directory
*any* help would be greatly appreciated.
Bookmarks