Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: Tres Melton <tres@...>
Subject: Re: chrrot'ed environment not available to users
Date: Wed, 29 Mar 2006 16:14:29 -0700
On Thu, 2005-12-08 at 08:46 -0800, Mark Knecht wrote:
> Hi,
>    Thanks for the help yesterday. I now have a partially populated
> chroot'ed environment that runs Firefox and a few other things.
> Unfortunately it's not available to users:
> 
> mark@lightning ~ $ linux32 chroot /mnt/gentoo32 /bin/bash
> chroot: cannot change root directory to /mnt/gentoo32: Operation not permitted
> mark@lightning ~ $
> 
>    Anyway, thanks in advance for you help.
> 
> cheers,
> Mark
> 
Not to knock Billy's idea as it seems valid too but I use a script file:

#!/bin/bash
#
#  Written and Copyright by Tres Melton (2005)
#
#  Run a 32 bit program from 64 bit space
#
#       If parameters given then execute the command instead of /bin/bash
#       If no parameters then create a new 32 bit chroot jail shell
#

JAIL_DIR="/mnt/sdb3/Gentoo-32"

if [ $# -eq 0 ] ; then
  echo "Starting 32 bit shell..."
  /bin/linux32 sudo chroot ${JAIL_DIR} /usr/bin/sudo -u "#${UID}" bash -c "( cd ~ ; /bin/bash )"
else
  echo "Starting a 32 bit shell to run \"$*\""
  /bin/linux32 sudo chroot ${JAIL_DIR} /usr/bin/sudo -u "#${UID}" bash -c "( cd ~ ; $* )"
fi

Now /etc/sudoers needs to allow all users to call chroot and if you
don't trust everyone then you may choose to lock some of the parameters
and not let them be provided on the CLI.  Also each user that uses this
should have an account in the 32bit chroot jail as well.

Cheers,
-- 
Tres Melton
IRC & Gentoo: RiverRat
Attachment:
signature.asc (This is a digitally signed message part)
Replies:
Re: chrrot'ed environment not available to users
-- Duncan
References:
chrrot'ed environment not available to users
-- Mark Knecht
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: chrooted environment not available to users
Next by thread:
Re: chrrot'ed environment not available to users
Previous by date:
Re: 64-bit or 32-bit?
Next by date:
Re: chrrot'ed environment not available to users


Updated Jun 17, 2009

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.