| Article: |
Securing Systems with chroot | |
| Subject: | Typical Problem | |
| Date: | 2003-02-04 03:42:53 | |
| From: | anonymous2 | |
|
Hi, after reading this article I tried to chroot in a directory named /test. /test/bin/sh existed but chroot said "/bin/sh: No such file or directory". The article says, that you have to cp some libraries to /test/lib/ but how you can find out which libs to cp it doesn't tell.
|
||
Showing messages 1 through 2 of 2.
-
Less Typical Problem
2003-10-19 16:17:25 anonymous2 [View]
-
Re: Typical Problem
2003-02-10 07:04:48 anonymous2 [View]
The command must be relative to the new root, ex:
mkdir /tmp/test /tmp/test/bin
cp /bin/sh /tmp/test/bin/
chroot /tmp/test bin/sh
or
chroot /tmp/test /bin/sh
not
chroot /tmp/test /tmp/test/bin/sh
assumed that sh is statically linked( it's in the root partition)



cp /etc/ld.so.conf /test/etc
ldconfig -r /test