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

Miroslav Suchy msuchy at redhat.com
Thu Oct 2 02:09:54 PDT 2014


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:

/usr/bin/systemd-nspawn -D foo /bin/su -l mockbuild -c 'rpmbuild -root
\'/build\' ...'

which quickly go into escape-hell.

Is there some better way to became specific user in container? Is it
worth filing RFE? Because I'm afraid that becoming specific user depends
on content of container and systemd-nspawn itself can not do much here.
Correct?

Mirek


More information about the systemd-devel mailing list