I'd like to either use su
or sudo -u
to switch users to the subuid created by LXC to run a container as unprivileged.
Note:
- There is no username assigned to the UIDs in which containers are run.
- Due to the above, I need to be able to switch purely by UID.
I've tried doing as this post instructed, but I get the following:
[user@laptop user]# sudo -u \#100000 id
sudo: unknown user #100000
If It's somehow helpful:
- I'm using Arch Linux
- I'm using LXD to manage to container(s)
Does anyone know if there is a way to do this, even if via another command or method?