[scponly] chroot question

Roland Lammel roland.lammel at kapsch.net
Thu Sep 11 13:44:05 EDT 2003


You probably need to find your dynamic-loader lib which might simply be named differntly.

For example on one of our Suse boxes its named like this:
-rwxr-xr-x    1 root     root        94543 Sep 20  2001 /lib/ld-2.2.4.so
lrwxrwxrwx    1 root     root           11 Feb 18  2002 /lib/ld-linux.so.2 -> ld-2.2.4.so

Now that you found your libc you can use
shell> ldd /lib/libc.so.6
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

To find out the libs it needs, so in my case it's /lib/ld-linux.so.2

Best regards

+rl

nightowl wrote:
> 
> Thank you for your reply. However, I had read an read again and again
> the manual (INSTALL file in the downloaded package). I find it quite
> crapy.
> 
> I'm trying to install the script on Linux RH8.0.
> 
> First of all, when I followed the manual, I had done 'useradd' before
> I ran 'make jail'. Resulted in an error. Removed the user made with
> useradd and ran 'make jail' again. Nowhere in the docs I could find
> the script setup_chroot.sh, but I discovered that was the script
> called by make jail.
> 
> Next, I got the same "You need the program useradd...". Since I had
> that, I just commented out the check. The patch I saw yesterday on
> this list patches only the .in version of setup... which does not work
> since all those variables pointing to the various programs are not
> defined on my box.
> 
> Now, with the check commented out, it seemed to work.
> Only, I get ...
> /usr/bin/install: cannot create regular file `/home/mytestuser//datafiles//lib/i686/libc.so.6': No such file or directory
> /usr/bin/install: cannot stat `/lib/ld.so': No such file or directory
> 
> locate libc.so.6 gave pointed me to /lib/libc.so.6, so I copied that
> one too to the chroot dir. However, locate does not find 'ld.so' ...
> and I'm stuck 'cause it keeps returning ...
> 
> # scp INSTALL mytestuser at localhost:
> mytestuser at localhost's password: ***
> lost connection
> 
> Same thing, but with the debuglevel (nowhere to be found in the
> manual) on 10 ...
> 
> [root at morgaine scponly-3.8]# scp INSTALL mytestuser at localhost:
> mytestuser at localhost's password:
> [3024]: chrooted binary in place, will chroot()
> [3024]: 3 arguments in total.
> [3024]:         arg 0 is scponlyc
> [3024]:         arg 1 is -c
> [3024]:         arg 2 is scp -t .
> [3024]: opened log at LOG_AUTHPRIV, opts 0x00000029
> [3024]: retrieved home directory of "/home/mytestuser//datafiles" for
> user "mytestuser"
> [3024]: chrooting to dir: "/home/mytestuser"
> [3024]: setting uid to 507
> [3024]: processing request: "scp -t ."
> [3024]: running: /usr/bin/scp -t . (username: mytestuser(507), IP/port: 127.0.0.1 58257 22)
> [3024]: failed: /usr/bin/scp -t . with error No such file or
> directory(2) (username: mytestuser(507), IP/port: 127.0.0.1 58257 22)
> lost connection
> 
> what's wrong ?
> 
> 
> 
> 
> Wednesday, September 10, 2003, 5:52:52 PM, you wrote:
> 
> RL> First simply RTFM ;-)
> 
> RL> After reading the docs provided with scponly distribution you'll find a script setup_chroot.sh
> RL> which should do exactly what you want.
> 
> RL> It might just not work for your platform (as you haven't specified it, look in the docs, what's supported an what not)
> 
> RL> Good Luck
> 
> RL> +rl
> 
> RL> nightowl wrote:
> 
>>>I am trying to set up SCPOnly with Chroot. However, I have no clue
>>>which files to copy to the new root?
>>>
>>>Can anybody point me to the right documentation or give me the needed
>>>files ?
>>>
>>>_______________________________________________
>>>scponly mailing list
>>>scponly at lists.ccs.neu.edu
>>>https://lists.ccs.neu.edu/bin/listinfo/scponly
> 
> 
> 
> 
> 

-- 
Ing. Roland Lammel | Technical Assistance Services
Kapsch CarrierCom AG | Am Europlatz 5 | 1120 Vienna | Austria
Phone +43 (0)50811 3456 | Mobile +43 664 628 3456 | Fax +43 (0)50811 3405
mailto:roland.lammel at kapsch.net | http://www.kapsch.net




More information about the scponly mailing list