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

[Error]sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set #721

Closed
LaneaLucy opened this issue Apr 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@LaneaLucy
Copy link

LaneaLucy commented Apr 25, 2023

Describe the bug
Created a container with systems and installed some software. After exit the container, stop it and then enter it again, I can't use sudo anymore. Getting "sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

To Reproduce
distrobox-create -i docker.io/jgoerzen/debian-base-minimal --name dab --init
distrobox enter dab
git clone https://github.com/opendigitalradio/dab-scripts.git
sudo bash dab-scripts/install/mmbtools-get --branch master install
-- until here everything works normal --
exit
distrobox stop dab
distrobox enter dab
sudo nc

Expected behavior
I think, the expected behavior of sudo is self explaining....
It shouldn't say "sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

Desktop (please complete the following information):

  • Are you using podman or docker? Podman
  • Which version or podman or docker?
  • Which version of distrobox?
    Both versions that got installed yesterday by the distrobox installation scripts...

Additional context
The software I installed still works, but I need netcat for some other software, which is only found, when being executed with sudo...

Edit: and I'm running on steam Deck...

@LaneaLucy LaneaLucy added the bug Something isn't working label Apr 25, 2023
@89luca89
Copy link
Owner

Hi @LaneaLucy
this is due to the dab-scripts you run.

In install/mmbtools-get line 317 it does a: chown --recursive ${odr_user}:${odr_user} /home/${odr_user}

This will include the files of the containers, thus setting the sudo in the container as owned by your user.

This is not a bug in distrobox, maybe you can contact the developers of that project to exclude the container files from that recursive chown,

@89luca89 89luca89 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2023
@LaneaLucy
Copy link
Author

Thx, that really helped

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

2 participants