89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.41k stars 384 forks source link

[Error] Unable to create rootfull container when user is handled by systemd-homed #1423

Closed fcrozat closed 2 weeks ago

fcrozat commented 1 month ago

Describe the bug When user is handled by systemd-homed, rootfull container can't be created.

To Reproduce on MicroOS Desktop/Aeon, with podman:

distrobox create --pull --root --init --unshare-all --image registry.opensuse.org/opensuse/distrobox:latest --name foobar
distrobox-enter --root foobar

Logs foobar.log

89luca89 commented 2 weeks ago

Hi @fcrozat!

does this happen with rootless too?

Also can you share the content of /etc/nsswitch.conf of the host and the container? it should have references to systemd

Also it would be useful to have the content of /etc/passwd of the container

Thanks!

89luca89 commented 2 weeks ago

In the meantime I've added a fallback that manipulates /etc/shadow directly to initialize the user in the container, this should now work

Let me know if there are still issues :+1: