HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   ssh chrooted (http://www.howtoforge.com/forums/showthread.php?t=4133)

unkn0wn 8th May 2006 11: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,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+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 00:28

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

uname -m
?

unkn0wn 9th May 2006 08:00

debian sarge 3.1
uname -m
i686

falko 9th May 2006 17:22

Did you run
Code:

./configure
before
Code:

make
?

What's the output of
Code:

./configure --help
?

unkn0wn 10th May 2006 09: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 09:32

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

falko 10th May 2006 15:06

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

unkn0wn 11th May 2006 08: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 11th May 2006 23:07

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

falko 12th May 2006 11:01

Is /home/chroot/bin/bash executable?


All times are GMT +2. The time now is 12:21.

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