All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: yocto@yoctoproject.org
Subject: useradd-staticids: problem with --user-group
Date: Tue, 02 Jul 2019 07:56:15 +0200	[thread overview]
Message-ID: <6621707.vr12PsKZiC@ws-140106> (raw)

Hi,

I need to use useradd-staticids to have fixed UID/GID during update. For that I've set the following in my conf/local.conf:
> USERADD_ERROR_DYNAMIC = "1"
> USERADDEXTENSION = "useradd-staticids"
> USERADD_GID_TABLES = "files/group"
> USERADD_UID_TABLES = "files/passwd"

After deleting TMPDIR and rebuilding I get a build error in dbus package. In the log.do_prepare_recipe_sysroot logfile I have the following lines:
> [...]
> Running groupadd commands...
> NOTE: dbus: Performing groupadd with [--root $TMPDIR/work/cortexa7hf-neon-poky-linux-gnueabi/dbus/1.12.2-r0/recipe-sysroot --force --gid 999 --system netdev]
> NOTE: dbus: group netdev already exists, not re-creating it
> NOTE: dbus: Performing groupadd with [--root $TMPDIR/work/cortexa7hf-neon-poky-linux-gnueabi/dbus/1.12.2-r0/recipe-sysroot  --gid 998 messagebus]
> groupadd: GID '998' already exists

In $TMPDIR/work/cortexa7hf-neon-poky-linux-gnueabi/dbus/1.12.2-r0/recipe-sysroot/etc/group there the following entries:
> [...]
> nogroup:*:65534:
> systemd-journal:x:999:
> systemd-timesync:!:998:
> systemd-network:!:997:
> systemd-resolve:!:996:
> polkitd:!:995:
> systemd-bus-proxy:!:994:
> netdev:x:993:

So, ok. netdev is already there, but due to the --force parameter this is no error. But for adding the user-group using a fixed GID without --force fails as GID 998 is already used for systemd-timesync at this stage.

$ grep systemd-timesync files/group 
systemd-timesync:x:990:

So I wonder how to solve that. Should --force be added to the user-group step too? Or should the wanted GIDs for groups like systemd-timesync also be fixed before adding dbus specific users/groups?

I'm currently using sumo and without using useradd-staticids the build is fine, but the mapping user<->UID/GID might alter.

Best regards,
Alexander





                 reply	other threads:[~2019-07-02  6:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6621707.vr12PsKZiC@ws-140106 \
    --to=alexander.stein@systec-electronic.com \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.