Distrobox user not in sudoers file

Previously used distrobox with no issue. Recent reinstall and installed distrobox. I’ve created an arch, debian, and tumbleweed container and in each I’ve gotten that my created user isn’t in sudoers when I try to elevate permissions in the containers. Uninstall reinstall does not resolve the issue.

Can you show us the terminal commands entered and output? Please use the ‘preformatted’ text style for readability (the </> button in the formatting toolbar).

I did run across this, which might be helpful:

user@USER-LINUX:~> distrobox create --name arch --image archlinux
Using default tag: latest
latest: Pulling from library/archlinux
9a82a64c3a84: Pull complete 
45f82ee8a39c: Pull complete 
Digest: sha256:fed6efe803e79d94544f93607e4afec1056cfd9bee5744c965eec0944624d81f
Status: Downloaded newer image for archlinux:latest
docker.io/library/archlinux:latest
Creating 'arch' using image archlinux    [ OK ]
Distrobox 'arch' successfully created.
To enter, run:

distrobox enter arch

Successfully copied 2.05kB to /tmp/arch.os-release
user@USER-LINUX:~> distrobox enter arch
Starting container...                            [ OK ]
Installing basic packages...                     [ OK ]
Setting up devpts mounts...                      [ OK ]
Setting up read-only mounts...                   [ OK ]
Setting up read-write mounts...                  [ OK ]
Setting up host's sockets integration...         [ OK ]
Integrating host's themes, icons, fonts...       [ OK ]
Setting up package manager exceptions...         [ OK ]
Setting up pacman exceptions...                  [ OK ]
Setting up pacman hooks...                       [ OK ]
Setting up distrobox profile...                  [ OK ]
Setting up sudo...                               [ OK ]
Setting up groups...                             [ OK ]
Setting up users...                              [ OK ]
Setting up skel...                               [ OK ]

Container Setup Complete!
⚠  First time user password setup ⚠ 
New password: 
Retype new password: 
passwd: password updated successfully
[user@arch ~]$ sudo pacman

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

[sudo] password for user: 
user is not in the sudoers file.
[user@arch ~]$

Ah I had to add myself to wheel group and uncomment the line in visudo about allowing wheel users to execute any command with a password, reboot, delete the old container and create a new one and now it works. Probably should be mentioned on Distrobox - openSUSE Wiki

I havent had to mess with visudo in so long I kind of forgot about it.

Glad to hear you figured it out - it does seem that something changed, though, as it used to work without messing with the wheel group. I have been trying it in both Arch and Tumbleweed containers, and neither of them worked (I figured the wheel option would work as well, but was trying to reproduce the previous working configuration that didn’t require that change).

Had a little follow-up on this - it appears there is a known issue that is likely related to what you’re seeing as well:

Something that came out of a discussion I had with @arvidjaar on the factory mailing list about this that I hadn’t thought about is that these are still docker containers, so if you need to tweak something, you can also use docker (or podman if that’s your container tool of choice) to enter the container as root and then tweak things to your liking, using:

docker exec -it <container name> bash

That will take you into the container as root, and you can modify the root configuration as needed to adjust the setup. Using wheel is also a perfectly viable solution (as you found).