Skip to content

[Error] distrobox-enter fails with newer ubuntu images #1979

@Kamorst

Description

@Kamorst

Describe the bug
Setting up existing user... phase of distrobox-enter fails on images of ubuntu which has ubuntu as default non-root user (eg: -i ubuntu:25.10 or -i ubuntu:24.04). To see more.

To Reproduce
distrobox-ephemeral -H $(mktemp -d) -i ubuntu:25.10

Expected behavior
distrobox enter normally.

Logs
distrobox.log
More importantly:

distrobox: Setting up existing user...
+ usermod --home /tmp/tmp.cFrICY1IHn --shell /usr/bin/bash --groups sudo --gid 1000 ubuntu
+ [ ubuntu != psato ]
+ usermod --login psato ubuntu
+ getent passwd ubuntu
+ cut -d: -f3
+ [  != 1000 ]
+ usermod --uid 1000 ubuntu
usermod: user 'ubuntu' does not exist

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod? podman
  • Which version or podman, docker or lilipod? 5.7.1
  • Which version of distrobox? 1.8.2.3
  • Which host distribution? Fedora 43
  • How did you install distrobox? git clone and ./install

Additional context
Reverting the commit 9867e17 makes the problem go away.

After reverting the above commit and entering a ubuntu image, the group of gid 1000 is set to ubuntu instead of my user name which I think is not the expected behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions