From: Farid BENAMROUCHE <fariouche@yahoo.fr>
To: <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/"
Date: Sat, 31 Mar 2018 09:39:47 +0000 (UTC) [thread overview]
Message-ID: <211710464.79357.1522489187353@mail.yahoo.com> (raw)
In-Reply-To: 211710464.79357.1522489187353.ref@mail.yahoo.com
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 admit.
--------------------------------------------
En date de : Ven 30.3.18, James Le Cuirot <chewi@gentoo.org> a écrit :
Objet: Re: [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/"
À: gentoo-dev@lists.gentoo.org
Date: Vendredi 30 mars 2018, 21h56
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
next parent reply other threads:[~2018-03-31 9:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <211710464.79357.1522489187353.ref@mail.yahoo.com>
2018-03-31 9:39 ` Farid BENAMROUCHE [this message]
2018-03-31 10:06 ` [gentoo-dev] Re : Modification proposal for user/group creation when ROOT!="/" James Le Cuirot
[not found] <160839029.2375229.1522435938193.ref@mail.yahoo.com>
2018-03-30 18:52 ` 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
[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=211710464.79357.1522489187353@mail.yahoo.com \
--to=fariouche@yahoo.fr \
--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