You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[failed] creating or modifying user "build": exit status 6: Cmd: "useradd" "--root" "/sysroot" "--create-home" "--password" "*" "--groups" "docker,sudo,kvm" "tormath1" Stdout: "" Stderr: "useradd: group 'kvm' does not exist\n"
The group kvmdoes exist but it's present under an alternative location (/usr/share/baselayout/group), it's just that there is no active NSS switch configuration, useradd only tries to find the group in /etc/group.
Note: with an older useradd binary it was failing too but it was not throwing an error.
This led us to try an alternative way to add user into a group: systemd-userdb1 - with this configuration:
variant: flatcarversion: 1.0.0storage:
files:
- path: /etc/userdb/tormath1:docker.membershipcontents:
inline: | some content
- path: /etc/userdb/tormath1:kvm.membershipcontents:
inline: | some content
- path: /etc/userdb/tormath1:sudo.membershipcontents:
inline: | some content
We can create the user with the correct group membership.
Desired Feature
The idea would be to use systemd-userdb as a last resort if useradd fails because of non-existing group.
Feature Request
Hi, with Flatcar we noticed back in the days that an update changed the behavior to add user into a group:
This configuration fails the following message:
The group
kvm
does exist but it's present under an alternative location (/usr/share/baselayout/group
), it's just that there is no active NSS switch configuration,useradd
only tries to find the group in/etc/group
.Note: with an older useradd binary it was failing too but it was not throwing an error.
This led us to try an alternative way to add user into a group:
systemd-userdb
1 - with this configuration:We can create the user with the correct group membership.
Desired Feature
The idea would be to use
systemd-userdb
as a last resort ifuseradd
fails because of non-existing group.Footnotes
https://www.freedesktop.org/software/systemd/man/nss-systemd.html ↩
The text was updated successfully, but these errors were encountered: