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
{{ message }}
Repository navigation
Support subordinate user and group IDs provided by SSSD on enterprise FreeIPA set-ups #1074
Toolbox currently seems to be hard-coded to look for subuid and subgid in /etc/sub{u,g}id respectively. These ids may now be provided by FreeIPA in a centralized way. Podman and buildah can both take advantage of this new mechanism; maybe toolbox should too
Steps how to reproduce the behaviour
Enable centralized subid support in FreeIPA/IdM (subid: sss in /etc/nsswitch.conf)
Remove /etc/sub{u,g}id entries for the user under test
getsubids <user> should still return a valid subid range
toolbox enter displays an error like this:
$ toolbox enter
Error: /etc/subgid and /etc/subuid don't have entries for user mjackson
See the podman(1), subgid(5), subuid(5) and usermod(8) manuals for more
information.
Expected behaviour
Toolbox should come up and be usable
Actual behaviour
Program reports error and refuses to proceed
Output of toolbox --version (v0.0.90+)
e.g., toolbox version 0.0.90
Toolbox package info (rpm -q toolbox)
toolbox-0.0.99.3-5.fc36.x86_64
Output of podman version
Client: Podman Engine
Version: 4.1.1
API Version: 4.1.1
Go Version: go1.18.3
Built: Wed Jun 15 09:31:58 2022
OS/Arch: linux/amd64
Podman package info (rpm -q podman)
podman-4.1.1-1.fc36.x86_64
We started checking/etc/subgid and /etc/subuid for better error handling on hosts where the current user might have been created long ago with an old version of shadow-utils.
I see that getsubids <user> works on my Fedora 36, even though I don't think I enabled centralized subid support in FreeIPA. I don't see subid: sss in my /etc/nsswitch.conf.
So, I suppose we should first check getsubids <user>. In case the getsubids binary is absent, we can fallback to the directly checking the files. Did I get that right?
Yes, I think changing the test to use getsubids is an ideal approach - that binary should be present with any version of shadow that supports this scheme. And if the binary is absent, checking the files is as good an approach as any.
changed the title [-]Should toolbox switch to new idMapping mechanism for mapping subids?[/-][+]Support subordinate user and group IDs provided by SSSD on enterprise FreeIPA set-ups[/+]on Nov 30, 2022
Activity
debarshiray commentedon Aug 5, 2022
Thanks for pointing this out.
We started checking
/etc/subgidand/etc/subuidfor better error handling on hosts where the current user might have been created long ago with an old version ofshadow-utils.I see that
getsubids <user>works on my Fedora 36, even though I don't think I enabled centralized subid support in FreeIPA. I don't seesubid: sssin my/etc/nsswitch.conf.So, I suppose we should first check
getsubids <user>. In case thegetsubidsbinary is absent, we can fallback to the directly checking the files. Did I get that right?mhjacks commentedon Aug 6, 2022
Yes, I think changing the test to use getsubids is an ideal approach - that binary should be present with any version of shadow that supports this scheme. And if the binary is absent, checking the files is as good an approach as any.
[-]Should toolbox switch to new idMapping mechanism for mapping subids?[/-][+]Support subordinate user and group IDs provided by SSSD on enterprise FreeIPA set-ups[/+]debarshiray commentedon Nov 30, 2022
Updated the title of this issue, because @mhjacks has gotten this to work in #1180
Enhance subid check by using library function
Support subordinate user and group IDs on enterprise set-ups
Support subordinate user and group IDs on enterprise set-ups
Support subordinate user and group IDs on enterprise set-ups
Support subordinate user and group IDs on enterprise set-ups
Support subordinate user and group IDs on enterprise set-ups
Support subordinate user and group ID ranges on enterprise set-ups
Support subordinate user and group ID ranges on enterprise set-ups
build: Consolidate the binary used to generate the shell completions
Support subordinate user and group ID ranges on enterprise set-ups
Support subordinate user and group ID ranges on enterprise set-ups
debarshiray commentedon Jan 28, 2023
This was fixed in #1180 (and #1219).
.github/workflows: Run the CI on Ubuntu 22.04
Add shadow to the list of build dependencies