command sudo
cannot work in podman container
#22546
Replies: 2 comments 1 reply
-
Did you check the file permissions on the sudo binary? Is the underlying file system mounted nosuid maybe, etc... In any case I don't see how this is podman bug so I move it to a discussion |
Beta Was this translation helpful? Give feedback.
-
We don't have access to the image in question, and I don't have a guess for how the container's |
Beta Was this translation helpful? Give feedback.
-
Issue Description
Hello everyone. I have a podman container which was created by ubuntu:22.04 image. A bug occurred after a certain kernel update. There was a problem with the file permissions in my container. Specifically, when I used
podman run --it -v /home/flower/CTFhub:/home/flower/CTFhub:rw --group-add $(getent group flower | cut -d: -f3) --userns keep-id -u $(id -u flower):$(id -g flower) littflower/dockerpwn:v6 bash
to create a container and attached it, I got:The attach command looks like this:
you can find my image here
thanks for your help.
Steps to reproduce the issue
Steps to reproduce the issue
podman run --it -v /home/flower/CTFhub:/home/flower/CTFhub:rw --group-add $(getent group flower | cut -d: -f3) --userns keep-id -u $(id -u flower):$(id -g flower) littflower/dockerpwn:v6 bash
su -
Describe the results you received
just like these:
Describe the results you expected
I thought when I type
sudo
it should work fine and give me superuser rights.podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional information
The cause of this problem may be that I did not restart the system immediately after updating the kernel, which caused unexpected things to happen to the container.
Beta Was this translation helpful? Give feedback.
All reactions