Skip to content
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

Groups in distrobox containers are messed up #1150

Closed
mcepl opened this issue Jan 10, 2024 · 0 comments
Closed

Groups in distrobox containers are messed up #1150

mcepl opened this issue Jan 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mcepl
Copy link
Contributor

mcepl commented Jan 10, 2024

Describe the bug

Using distrobox (using distrobox-1.6.0.1-1.1.noarch and podman-4.8.3-1.1.x86_64 on MicroOS-based distro) I get this:

With a root-full container:

tumbleweed-pkg~/r/m2crypto (master)$ id
uid=1000(matej) gid=1000(matej) groups=1000(matej),0(root)
tumbleweed-pkg~/r/m2crypto (master)$ groups
matej root
tumbleweed-pkg~/r/m2crypto (master)$ sudo groups matej
[sudo] heslo pro matej: 
matej : matej wheel

With a rootless container:

fun~$ id
uid=1000(matej) gid=1000(matej) groups=1000(matej),65534(nobody)
fun~$ groups
matej nobody
fun~$ sudo groups matej
matej : matej wheel

To Reproduce
Just assemble those two containers with this distrobox.ini:

[fun]
image="registry.opensuse.org/home/mcepl/moldavite/containers/opensuse/fun:latest"
additional_packages=pandoc
init-hooks=chsh -s /usr/bin/fish
pull=true
replace=true

[tumbleweed-pkg]
image="registry.opensuse.org/home/mcepl/moldavite/containers/opensuse/distrobox-mcepl-packaging:latest"
additional_packages=python3-khard
init-hooks=chsh -s /usr/bin/fish
pull=true
replace=true
root=true

Then because of #1092 using podman switch sudo from Defaults targetpw to the default sudo behaviour (so we can function even without the root password).

Add normal user of both containers (via sudo -i) to the wheel group, restart the host system (to be certain).

Run the above shown commands.

Expected behavior
groups command would show the same result as for normal users as for the root.

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod? podman
  • Which version or podman, docker or lilipod? see above
  • Which version of distrobox? see above
  • Which host distribution? MicroOS (basically openSUSE/Tumbleweed)
  • How did you install distrobox? from the openSUSE packages.
@mcepl mcepl added the bug Something isn't working label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant