Sharing a machine with multiple linux users

Suppose I want to set up a server of sorts, but on a normal universal blue image (i.e., bluefin, not ucore). I do so with sudo adduser username on the host.

I’d like that user to be able to run their own distroboxes. But, when I do so, I see errors like

newuser@host:~$ distrobox-list
Failed to obtain podman configuration: mkdir /run/user/0/libpod: permission denied

Is there a way to do this, or am I trying something not recommended?

Update: Ah, I see this particular error is from how I was testing with sudo su: Unable to run podman via user (without sudo or root access). · Issue #8052 · containers/podman · GitHub

But, if I follow that recommendation of sudo su --login, I still see warnings

newuser@host:~$ distrobox-list
WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available
WARN[0000] For using systemd, you may need to log in using a user session
WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1001` (possibly as root)
WARN[0000] Falling back to --cgroup-manager=cgroupfs
WARN[0000] Failed to add pause process to systemd sandbox cgroup: dbus: couldn't determine address of session bus
ID           | NAME                 | STATUS             | IMAGE

I did confirm that running the loginctl enable-linger did make the warnings go away.

1 Like

It is working in my case.

I did:

  1. With my user create new container: distrobox-create --image fedora:40 --name c1
  2. List containers: distrobox-list and “c1” is displayed.
  3. Create user: sudo adduser newuser
  4. Switch to user: sudo -iu newuser
  5. Check current user: whoamiand it displays “newuser”.
  6. Create new container: distrobox-create --image fedora:40 --name c2
  7. List containers: distrobox-list and “c2” is displayed.

EDIT: With your user assign password to new user: sudo passwd newuser

1 Like