HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Server Operation (
-   -   ssh chrooted (

unkn0wn 8th May 2006 12:25

ssh chrooted
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, -o 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
ln -s
ln -s
gcc -fPIC -O3 -DNO_vsnprintf -DUSE_MMAP -o example example.o -L.
/usr/lib/libc_nonshared.a(elf-init.oS)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x 0): 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+0 x0): first defined here
collect2: ld returned 1 exit status
make: *** [example] Error 1

for zlib.
i follow howto from howtoforge.

falko 9th May 2006 01:28

Which distribution do you use? What's the output of

uname -m

unkn0wn 9th May 2006 09:00

debian sarge 3.1
uname -m

falko 9th May 2006 18:22

Did you run



What's the output of

./configure --help

unkn0wn 10th May 2006 10:13

/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

unkn0wn 10th May 2006 10:32

ii menage it but i wanna apt libcrypto and have a new error :)

Do you want to continue? [Y/n] y
Get:1 testing/main libpam0g 0.79-3.1 [79.0kB]
Get:2 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

falko 10th May 2006 16:06

Looks like an error of the package maintainers. Seems as if these packages depend on Exim...

unkn0wn 11th May 2006 09:01

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 :)

unkn0wn 12th May 2006 00:07

i made new init script and start new sshd chrooted and its ok :)
but user testuser cant log in its says:


/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


falko 12th May 2006 12:01

Is /home/chroot/bin/bash executable?

All times are GMT +2. The time now is 10:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.