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 F20FC1382C5 for ; Sat, 31 Mar 2018 09:39:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95134E0946; Sat, 31 Mar 2018 09:39:52 +0000 (UTC) Received: from sonic301-21.consmr.mail.ir2.yahoo.com (sonic301-21.consmr.mail.ir2.yahoo.com [77.238.176.98]) (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 1F799E0933 for ; Sat, 31 Mar 2018 09:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s2048; t=1522489188; bh=rPUo43J4uRP+IaEWF764xAc605bynm0FH6GdblqhE2I=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=N8PTCyC/tpz4GsIsx2bcZms31vgfsrGjH3saUcTfY6MYPrypFXQiE3gxCWffgzz/yewy4eLvjmfVDPufe+ikMhycA3eCb/xVSnRiimeCHp0V+4igRODtK+I3ba7aIUnyzL8oWUCPODuBXbrmiHsxF1K7J0FK6fOJgjailYGrqGrz9hdux8guYY4jExc2ixDubF1OEUFiPYTt5Me35ggaWt/lOdYgKrxP5RCTVNAmT9xFQc1q6c8Y4gSgLOaolLS/zBN/DkqmqK4WZqjCwj9FFkto7PtYn8czX4gIHto81KjMRmeFXxLuCb89WWKsUaKSnAkgsnFqqjTjZhLoq9Odrw== X-YMail-OSG: ew0huI4VM1lM6brVACL4rWHs1Lbh40rJwLrzfalEED6ycCl0Kb0eTiTw0muaoWI B4eammUb4u2xFj8Mr8JevbIm7lDvUmKujmq7OViEwdhB9wiinK6c1GQ9VaBi0Rxj7yKNumLq80Ov YOu8gnDtEBz0b_3ROa0nbWqz0PAqv2gryV_tig8N03Xw6OUUp0mFtQuOpMrxXTajz6UyZOpWa0Fl 9kVTLHKrNaLu05D9.ETHp9Ix.m8rinDjVahaxrTyDD4eG0byJt_9_D1qDt5BHiF2gQ8bagIumoRg ojgQfO0.ZZZbouBRGHbQhxYU4ucFsCBLbeV9WonR72IxXYdDnvljOe78_4pFlAFSoC_HJ6x2eGR9 8uN5dWQpbOmGulNmmiymr6NEIt9vO57axIoll7rwp5hgQC3szF7zsyO6AyJtsA7.QrXAhphui_q8 vXZq.MDQ.jm3hSbGBGlc6QB8wPwRXkDxuXA6TgoCYxSLvWy7ho6xc7zk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ir2.yahoo.com with HTTP; Sat, 31 Mar 2018 09:39:48 +0000 Date: Sat, 31 Mar 2018 09:39:47 +0000 (UTC) From: Farid BENAMROUCHE To: Message-ID: <211710464.79357.1522489187353@mail.yahoo.com> Subject: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/" 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: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <211710464.79357.1522489187353.ref@mail.yahoo.com> X-Mailer: WebService/1.1.11701 YahooMailBasic Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G935F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.4 Chrome/56.0.2924.87 Mobile Safari/537.36 X-Archives-Salt: 936d9c69-c4ca-402a-9d31-253b176e3f04 X-Archives-Hash: e708e892aa04957aebd942215d77f187 interresting aproach. this could work. however, i can see a few limitations: - you must be root. - this is specific to linux as of today. - if you want to hide the mechanism, i don't see how without doing the same= portage modifications as in my solution. but this is maybe worth investigating. my solution isn't perfect too, I adm= it. -------------------------------------------- En date de=C2=A0: Ven 30.3.18, James Le Cuirot a =C3=A9c= rit=C2=A0: Objet: Re: [gentoo-dev] Re : Modification proposal for user/group creation= when ROOT!=3D"/" =C3=80: gentoo-dev@lists.gentoo.org Date: Vendredi 30 mars 2018, 21h56 =20 On Fri, 30 Mar 2018 20:47:20 +0100 James Le Cuirot wrote: =20 > 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 > >=C2=A0 $ sudo unshare -m /bin/sh -c "mount --bind /mnt/somewhere/etc /etc && groupadd foo" > >=C2=A0 groupadd: Cannot determine your user name.=C2=A0=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. =20 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 --=20 James Le Cuirot (chewi) Gentoo Linux Developer