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

[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.


----- 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
> => /lib/ (0x40019000)
> => /lib/ (0x4001d000)
>        /lib/ => /lib/ (0x40000000)
>$ mkdir -p /tmp/usr/lib /tmp/lib /tmp/sbin /tmp/etc
>$ cp /lib/ /lib/ /lib/ /tmp/lib
>$ cp /sbin/ldconfig /tmp/sbin
>$ sudo /usr/sbin/chroot /tmp /sbin/ldconfig
>$ sudo /usr/sbin/chroot /tmp /bin/sh
>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.
>-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,

-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,

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