Re: automounted home directories in chroot

2005-07-08 Thread Lennart Sorensen
On Fri, Jul 08, 2005 at 10:19:31AM -0300, Javier Kohen wrote:
> Any idea on how to make rbind do "what you want" when used with an
> automounted /media? The scenario is as follows: HAL manages /media and
> mounts/unmounts the external drives, CD's and whatnot; I've rbind
> mounted /media into a chroot's /media, but the changes are not
> propagated to the 'rbounded' mount point unless I remount it after each
> change. It doesn't really matter if I enter the chroot before or after
> the changes.

Hmm, that sounds like a bug to me then.  I certainly think the
description says it should work.  Maybe all rbind does it do a normal
bind mount on every mount in the dir you rbind mount, to save you from
doing all of them manually, but only at the time of running rbind, not
everytime mounts are added or deleted.  Certainly doing a small test
here shows that you are right, it doesn't update when you add more
mounts under it.  That sucks. :(

Never used HAL though, so perhaps it is doing something wrong.

> This is the relevant line from fstab:
> /media  /var/chroot/sid-ia32/media  nonerbind   0
> 0
> 
> And this is part of the contents:
> $ ls /media/
> cdrom  cdrom0  usbdisk  usbdisk-1
> $ ls /var/chroot/sid-ia32/media/
> cdrom  cdrom0  usbdisk  usbdisk-1
> 
> (It's fine up to here)
> 
> $ ls /media/usbdisk
> audio  home  jkohen  lost+found
> $ ls /var/chroot/sid-ia32/media/usbdisk

Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: automounted home directories in chroot

2005-07-08 Thread Javier Kohen
Hi Lennart,

El vie, 08-07-2005 a las 09:01 -0400, Lennart Sorensen escribió:

> Using rbind rather than bind then.

Any idea on how to make rbind do "what you want" when used with an
automounted /media? The scenario is as follows: HAL manages /media and
mounts/unmounts the external drives, CD's and whatnot; I've rbind
mounted /media into a chroot's /media, but the changes are not
propagated to the 'rbounded' mount point unless I remount it after each
change. It doesn't really matter if I enter the chroot before or after
the changes.

This is the relevant line from fstab:
/media  /var/chroot/sid-ia32/media  nonerbind   0
0

And this is part of the contents:
$ ls /media/
cdrom  cdrom0  usbdisk  usbdisk-1
$ ls /var/chroot/sid-ia32/media/
cdrom  cdrom0  usbdisk  usbdisk-1

(It's fine up to here)

$ ls /media/usbdisk
audio  home  jkohen  lost+found
$ ls /var/chroot/sid-ia32/media/usbdisk
$


Greetings,
-- 
Javier Kohen <[EMAIL PROTECTED]>
ICQ: blashyrkh #2361802
Jabber: [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: automounted home directories in chroot

2005-07-08 Thread Lennart Sorensen
On Thu, Jul 07, 2005 at 09:22:55PM +, Sven Krahn wrote:
> On 7/7/05, Rik Theys <[EMAIL PROTECTED]> wrote:
> > 
> > But on my production system, the home directories are automounted under 
> > /home.
> > Simply bind mounting /home in the chroot does not work: the home directories
> > are not available in the chroot :(.
> > 
> > Is there any way to fix this? Would it be possible to bind mount each home
> > directory into the chroot? For a few users this would be OK, but I have 
> > about
> > 300 users...
> > 
> 
> This will certainly work, see also
> http://lists.debian.org/debian-amd64/2005/06/msg00361.html
> 
> If you really need to bind mount your home directories one by one you
> could consider a small shell script in /etc/init.d/ which loops
> through the user names and mounts all their home directories (without
> putting them into /etc/fstab... maybe there are smarter approaches.

Using rbind rather than bind then.

Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: automounted home directories in chroot

2005-07-07 Thread Bob Proulx
Rik Theys wrote:
> I've followed the instructions in the AMD64 howto to setup a chroot jail to 
> run 32 apps.
> 
> When my home directories are available as regular directories under /home 
> (and /home is bind mounted into the chroot), the users can launch programs 
> like openoffice.org in the chroot jail.

Sounds good.

> But on my production system, the home directories are automounted
> under /home.  Simply bind mounting /home in the chroot does not
> work: the home directories are not available in the chroot :(.
> 
> Is there any way to fix this? Would it be possible to bind mount
> each home directory into the chroot? For a few users this would be
> OK, but I have about 300 users...

It is easier for a single user to do the chroot ia32 system for
running openoffice.org and other applications.  But since you have 300
users it is worth your time to make openoffice.org work outside the
chroot.  You need a couple of symlinks.  See this thread.

  http://lists.debian.org/debian-ia64/2003/03/msg00012.html

But it works fine with the symlink in place.  (Don't let the ia64 part
throw you off.  It has the same capabilities to run ia32 apps that
amd64 has and can share best practices there.)

With that change in place you should be able to roll that out to your
users without needing to run the application from the chroot.  (You
probably still want the chroot to install and manage the software.)

Bob


signature.asc
Description: Digital signature


Re: automounted home directories in chroot

2005-07-07 Thread Sven Krahn
On 7/7/05, Rik Theys <[EMAIL PROTECTED]> wrote:
> 
> But on my production system, the home directories are automounted under /home.
> Simply bind mounting /home in the chroot does not work: the home directories
> are not available in the chroot :(.
> 
> Is there any way to fix this? Would it be possible to bind mount each home
> directory into the chroot? For a few users this would be OK, but I have about
> 300 users...
> 

This will certainly work, see also
http://lists.debian.org/debian-amd64/2005/06/msg00361.html

If you really need to bind mount your home directories one by one you
could consider a small shell script in /etc/init.d/ which loops
through the user names and mounts all their home directories (without
putting them into /etc/fstab... maybe there are smarter approaches.
-- 
Best regards / Mit den besten Grüssen
Sven Krahn



automounted home directories in chroot

2005-07-07 Thread Rik Theys
Hi,

I've followed the instructions in the AMD64 howto to setup a chroot jail to 
run 32 apps.

When my home directories are available as regular directories under /home 
(and /home is bind mounted into the chroot), the users can launch programs 
like openoffice.org in the chroot jail.

But on my production system, the home directories are automounted under /home.
Simply bind mounting /home in the chroot does not work: the home directories 
are not available in the chroot :(.

Is there any way to fix this? Would it be possible to bind mount each home 
directory into the chroot? For a few users this would be OK, but I have about 
300 users...


-- 
Rik


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]