[systemd-devel] systemd-run -M and machinectl shell <container> <command>

Christian Rebischke Chris.Rebischke at archlinux.org
Mon Oct 9 14:56:13 UTC 2017


Hello everybody,
I wanted to make sure that this is a bug, before I open a ticket for
this. But I have the following issue.  I am currently writing a shell
script that is debootstrapping a container and changes different
configurations on that container ( a little bit like mkosi  )

One line of my script is the following:

machinectl shell "$CONTAINER_NAME" /bin/passwd -d root

I also tried:

systemd-run -M "$CONTAINER_NAME" /bin/passwd -d root


With both variations I have the same result:

systemd-run says the command was executed but it wasn't. The root
password on the container is still set. When I login into the container
via:

machinectl shell "$CONTAINER_NAME"

and do the line `passwd -d root` manually.. it's working.

Is this a bug or normal behaviour? In last case: What do i wrong?

Best regards,

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171009/19c8672d/attachment.sig>


More information about the systemd-devel mailing list