zlib-1.2.3# make gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o example.o example.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o adler32.o adler32.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o compress.o compress.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o crc32.o crc32.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o gzio.o gzio.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o uncompr.o uncompr.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o deflate.o deflate.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o trees.o trees.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o zutil.o zutil.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o inflate.o inflate.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o infback.o infback.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o inftrees.o inftrees.c gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -c -o inffast.o inffast.c gcc -shared -Wl,-soname,libz.so.1 -o libz.so.1.2.3 adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o rm -f libz.so libz.so.1 ln -s libz.so.1.2.3 libz.so ln -s libz.so.1.2.3 libz.so.1 gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -o example example.o -L. libz.so.1.2.3 /usr/lib/libc_nonshared.a(elf-init.oS)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx': : multiple definition of `__i686.get_pc_thunk.bx' example.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here collect2: ld returned 1 exit status make: *** [example] Error 1 for zlib. i follow howto from howtoforge.
/zlib-1.2.3# ./configure Checking for gcc... Building static library libz.a version 1.2.3 with gcc. Checking for unistd.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf() Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. Checking for errno.h... Yes. Checking for mmap support... Yes. and that it
ii menage it but i wanna apt libcrypto and have a new error Do you want to continue? [Y/n] y Get:1 ftp://ftp.hu.debian.org testing/main libpam0g 0.79-3.1 [79.0kB] Get:2 ftp://ftp.hu.debian.org testing/main libpam0g-dev 0.79-3.1 [117kB] Fetched 196kB in 12s (15.2kB/s) dpkg: syntax error: unknown group `Debian-exim' in statusoverride file E: Sub-process /usr/bin/dpkg returned an error code (2) wtf with that group
i just add group debian-exim in /etc/group and its work. Problem is i had one sshd from regular debian instalation after install of chrooted sshd services are down
i made new init script and start new sshd chrooted and its ok but user testuser cant log in its says: Code: Password: /bin/bash: No such file or directory Connection to localhost closed. i copy bin in /home/chroot ls /home/chroot/ bin dev etc home lib sc usr ls /home/chroot/bin/ bash ls mkdir mv ping pwd rm entry in /etc/passwd testuser:x:1003:100:testuser:/home/chroot/./home/testuser:/bin/bash
stat /home/chroot/bin/bash File: `/home/chroot/bin/bash' Size: 625228 Blocks: 1230 IO Block: 4096 regular file Device: 306h/774d Inode: 306012 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 50/ staff) Access: 2006-05-11 23:14:45.000000000 +0200 Modify: 2006-05-11 22:29:17.000000000 +0200 Change: 2006-05-11 22:29:17.000000000 +0200
wtf i can exec bin bash but over ssh nope when i su to testuser i can enter /bin /usr/bin where i want...i dont wanna this to happen $ echo $HOME /home/chroot/./home/testuser
yes its exist ls -al /home/chroot/home/testuser total 6 drwxr-xr-x 2 testuser users 1024 May 11 22:30 . drwxr-sr-x 3 root staff 1024 May 10 10:40 .. -rw------- 1 testuser users 377 May 12 12:46 .bash_history -rw-r--r-- 1 testuser users 567 May 10 10:40 .bash_profile -rw-r--r-- 1 testuser users 1834 May 10 10:40 .bashrc
maybe its problem in libs? i seen some erros when i execute your script. /home/chroot/lib# ls libacl.so.1 libncurses.so.5 libnss_compat.so.2 tls libattr.so.1 libnsl.so.1 libnss_files.so.2 this is libs