[systemd-devel] Enter in systemd-nspawn as specific user

Colin Walters walters at verbum.org
Thu Oct 2 03:14:06 PDT 2014


On Thu, Oct 2, 2014, at 05:09 AM, Miroslav Suchy wrote:
> Hi,
> when I run systemd-nspawn, I become root user inside of that container.
> If I want to become specific user inside of that container, I have to do
> something like:

You might also be interested in:
https://git.gnome.org/browse/linux-user-chroot

which is a setuid tool designed specifically for build systems that run
as non-root.  It's used by gnome-continuous, which goes from source code
all the way to generating qcow2 images for export as non-root.

For your quoting issues, I'd just copy a binary that does what you want
into the container, or create a read-only bind mount to outside the
container to it.


More information about the systemd-devel mailing list