From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C639C1382C5 for ; Fri, 30 Mar 2018 19:57:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 66C50E0841; Fri, 30 Mar 2018 19:56:55 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 144E5E080E for ; Fri, 30 Mar 2018 19:56:54 +0000 (UTC) Received: from symphony.aura-online.co.uk (154.189.187.81.in-addr.arpa [81.187.189.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: chewi) by smtp.gentoo.org (Postfix) with ESMTPSA id 35AC4335D4C for ; Fri, 30 Mar 2018 19:56:53 +0000 (UTC) Date: Fri, 30 Mar 2018 20:56:47 +0100 From: James Le Cuirot To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/" Message-ID: <20180330205647.33804c91@symphony.aura-online.co.uk> In-Reply-To: <20180330204720.6a0dc005@symphony.aura-online.co.uk> References: <160839029.2375229.1522435938193.ref@mail.yahoo.com> <160839029.2375229.1522435938193@mail.yahoo.com> <20180330202349.57ea1fa2@symphony.aura-online.co.uk> <20180330204720.6a0dc005@symphony.aura-online.co.uk> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/wCwAC3BTz8hDmgiJoSLpK4z"; protocol="application/pgp-signature" X-Archives-Salt: 369f4f80-fef4-4218-993b-31924fbbca41 X-Archives-Hash: 225a5891bd9bde481d1541c3f8e196d9 --Sig_/wCwAC3BTz8hDmgiJoSLpK4z Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 30 Mar 2018 20:47:20 +0100 James Le Cuirot wrote: > On Fri, 30 Mar 2018 20:23:49 +0100 > James Le Cuirot wrote: >=20 > > I did just have a lightbulb moment though. I've been playing with > > unshare recently and I wondered if we could leverage it here. > >=20 > > $ sudo unshare -m /bin/sh -c "mount --bind /mnt/somewhere/etc /etc &&= groupadd foo" > > groupadd: Cannot determine your user name. =20 >=20 > Aha! I was trying to do this against an NFS share for a system with a > different architecture. If I use a local mount with a compatible > architecture, it actually does work. I'll explore this some more. Figured it out! The system I was doing this against has an ancient glibc (long story) with an old nsswitch.conf. I replaced this file with a newer one and it all started working. Do you agree this could be the way forwards? --=20 James Le Cuirot (chewi) Gentoo Linux Developer --Sig_/wCwAC3BTz8hDmgiJoSLpK4z Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAEBCgB9FiEEUo3mvYaRpDkf2i7UIcYyEpxtfeQFAlq+ln9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDUy OERFNkJEODY5MUE0MzkxRkRBMkVENDIxQzYzMjEyOUM2RDdERTQACgkQIcYyEpxt feQH7g/+JklUnBMtMKc5DDLJU721paMgKsJIXoi7KYntRLChAK8CBRrNb7SYbuCd geF+Vwdl/ShW1Ccp87o/+YtSjt34fB9aqG2Kwpeh/oPMe/BlfVMTufAdafAAbCDM Oqv/y4IkcStPfpCiBdGhj+HoCIW12UnHLc+hwB0A3QQNMZ2SximTYXAnxG9IFMNh FSAkVas95nbSRuNILNiZLvw06YfpaVLdiJWD/RSYVffX9PniAsQV6jmmEzQ5varU 3dEcwzoMfEnOb0+JJqJVi/MwERa/29NujKTc2bh+k0aKEaRgnr7G4qUMwMKcDw3b q6eVdIIEljyHMNjp3rvLOH3rnFQjrPZIOKuwQ0TaSLh4lPtUiMZphlHSI4V0qg5e nBZ7035lAx3EX6viGFWxuAXOaijDgr1a9pRptYFOjLPzReqNbAEAHC1Z8u4Ob8cK zB9kNdQ6mNsNZTPUi6YvyhGkeH4Jk/3p03PiVPUqfEAvGx6/BVBaP+HJYj9P+STD JkgAzFrOr4KKTU1DnlDjPuVmLkBx4Y0edX4nxxbiaKH9+T1L9J7C46Nau3SfA6bE 542hrXT0nipN6xNnJRXRpuYBzl5QGnXVdmL+p0BWHi4g+8bHzxvNWtaytfcDvOgO wUH6NXAEwDEuU9SZC4+r3iabj1RXI4ST568YdVDFUUeLU5Tjh9g= =38nb -----END PGP SIGNATURE----- --Sig_/wCwAC3BTz8hDmgiJoSLpK4z--