Complete.Org: Mailing Lists: Archives: linux-help: May 2000:
[linux-help] Re: 'chroot' help.
Home

[linux-help] Re: 'chroot' help.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "linux-help@xxxxxxxxx" <linux-help@xxxxxxxxx>
Subject: [linux-help] Re: 'chroot' help.
From: Wang Min <wangmin@xxxxxxxxxxxxx>
Date: Sun, 21 May 2000 9:20:58 +0000
Reply-to: linux-help@xxxxxxxxx

Dear Sir,

Everything is fine until I execute 'sudo....', I cannot find sudo in my system 
as well as the RPMS files,so what is 'sudo' and what is his job?
BTW,although I cannot get sudo to work, I test 'chroot /tmp /bin/sh', it 
already works, the prompt is '[I have no name!@server /]#'(my server's name is 
server), why I have no name? I do have got a name Wang :-).
Thanks for your time.

Wang

----- Original Message -----
>On Sat, 20 May 2000, Wang Min wrote:
>
>> I am testing the chroot function, I think 'man chroot' talking
>> about nothing, I test the following commands 'chroot /tmp
>> /bin/sh', the error is 'chroot: cannot execute /bin/sh: No
>> such file or directory', as a matter of fact, there is bin,
>> sbin, usr, usr/sbin...sub-directory in /tmp, and there are the
>> appropriate files in the directories, what should I do to
>> implement chroot?
>
>You've got a good start, but since /bin/sh (probably /bin/bash) is
>dynamically linked, you need it's libraries:
>$ ldd /bin/sh
>        libtermcap.so.2 => /lib/libtermcap.so.2 (0x40019000)
>        libc.so.6 => /lib/libc.so.6 (0x4001d000)
>        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
>$ mkdir -p /tmp/usr/lib /tmp/lib /tmp/sbin /tmp/etc
>$ cp /lib/libtermcap.so.2 /lib/libc.so.6 /lib/ld-linux.so.2 /tmp/lib
>$ cp /sbin/ldconfig /tmp/sbin
>$ sudo /usr/sbin/chroot /tmp /sbin/ldconfig
>$ sudo /usr/sbin/chroot /tmp /bin/sh
>bash#
>
>-jeff
>-- 
>What do you think about these so-called anti-homelessness laws?  "I don't think
>them as anti-homelessness laws. I think of them as pro-homeowner laws." Thomas
>Canby, Ceramic Engineer. http://www.theonion.com/onion3547/wdyt_3547.html
>
>
>-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
>visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]