-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core user isn't added to groups when created via Ignition #41
Comments
There is currently a bug where if the core user is created via Ignition it is not added to the correct set of groups. This completely blocks kola from running as the core user is not directly added to the sudoers file with NOPASSWD but rather inherits it from the sudo group. Temporarily work around it until a fix lands. Upstream tracking ticket: coreos/fedora-coreos-config#41
For context, that logic was originally added in 5a0d60e. Assumptions:
Options:
On balance, option 3 seems like the one with the best UX and the fewest negative side effects. cc @cgwalters |
@bgilbert thanks for filing this, I hit it earlier but didn't realize what was going on under the hood. As a very-short-term workaround, I think the unit can be split in a conditional useradd and an unconditional usermod, with the For the longer-term, I like that option 1 allows us to know and reference the uid/gid when assembling the base OS in a static way. But I don't know if that it a real use-case we will have to handle (that is, having |
I think either option 1 or option 3 could be implemented now without a lot of effort. I'd hope that |
I can't think of a reason |
i'm good with whatever you prefer @bgilbert |
We now see the same issue referenced in coreos/mantle#981 in RHCOS as well. |
I agree. I think it's likely we'll have other such "conditionals" expressed through an overridable base Ignition config (e.g. for |
I went with option 3 in #74. |
treecompose: Add missing --repo arg
We link to it on the main docs page already, though it's useful here too in this section.
The
core
user is only added to groups if the user doesn't exist on first boot:fedora-coreos-config/fedora-coreos-base.yaml
Line 118 in f08f79e
Thus, if Ignition is used to add an SSH key to the
core
user, but the Ignition config doesn't explicitly add the user to groups, it will not have sudo access:The above config works on Container Linux.
cc @ajeddeloh
The text was updated successfully, but these errors were encountered: