public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/"
Date: Fri, 30 Mar 2018 20:56:47 +0100	[thread overview]
Message-ID: <20180330205647.33804c91@symphony.aura-online.co.uk> (raw)
In-Reply-To: <20180330204720.6a0dc005@symphony.aura-online.co.uk>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

On Fri, 30 Mar 2018 20:47:20 +0100
James Le Cuirot <chewi@gentoo.org> wrote:

> On Fri, 30 Mar 2018 20:23:49 +0100
> James Le Cuirot <chewi@gentoo.org> wrote:
> 
> > I did just have a lightbulb moment though. I've been playing with
> > unshare recently and I wondered if we could leverage it here.
> > 
> >   $ sudo unshare -m /bin/sh -c "mount --bind /mnt/somewhere/etc /etc && groupadd foo"
> >   groupadd: Cannot determine your user name.  
> 
> 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?

-- 
James Le Cuirot (chewi)
Gentoo Linux Developer

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

  reply	other threads:[~2018-03-30 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <160839029.2375229.1522435938193.ref@mail.yahoo.com>
2018-03-30 18:52 ` [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/" Farid BENAMROUCHE
2018-03-30 19:23   ` James Le Cuirot
2018-03-30 19:47     ` James Le Cuirot
2018-03-30 19:56       ` James Le Cuirot [this message]
     [not found] <211710464.79357.1522489187353.ref@mail.yahoo.com>
2018-03-31  9:39 ` Farid BENAMROUCHE
2018-03-31 10:06   ` James Le Cuirot
     [not found] <1187243158.3442649.1464116425074.JavaMail.yahoo.ref@mail.yahoo.com>
2016-05-24 19:00 ` [gentoo-dev] " Farid BENAMROUCHE
2016-06-08  5:44   ` [gentoo-dev] " Benda Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180330205647.33804c91@symphony.aura-online.co.uk \
    --to=chewi@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox