Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/"
Date: Fri, 30 Mar 2018 19:47:37
Message-Id: 20180330204720.6a0dc005@symphony.aura-online.co.uk
In Reply to: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/" by James Le Cuirot
1 On Fri, 30 Mar 2018 20:23:49 +0100
2 James Le Cuirot <chewi@g.o> wrote:
3
4 > I did just have a lightbulb moment though. I've been playing with
5 > unshare recently and I wondered if we could leverage it here.
6 >
7 > $ sudo unshare -m /bin/sh -c "mount --bind /mnt/somewhere/etc /etc && groupadd foo"
8 > groupadd: Cannot determine your user name.
9
10 Aha! I was trying to do this against an NFS share for a system with a
11 different architecture. If I use a local mount with a compatible
12 architecture, it actually does work. I'll explore this some more.
13
14 --
15 James Le Cuirot (chewi)
16 Gentoo Linux Developer

Replies