As root, systemd supports actions on user services using a combination of the --user
and --machine
flags ...
e.g.
systemctl --user --machine=<user>@.host <command> <service>
or, it can be shortened to (on localhost)
systemctl --user --machine=<user>@ <command> <service>
i.e.
systemctl --user --machine=jtingiris@ stop a-user.service
That is documented in man 1 systemctl
...
-M
, --machine=
Execute operation on a local container. Specify a container
name to connect to, optionally prefixed by a user name to
connect as and a separating "@
" character. If the special
string ".host
" is used in place of the container name, a
connection to the local system is made (which is useful to
connect to a specific user's user bus: "--user [email protected]
"). If the "@
" syntax is not used, the
connection is made as root user. If the "@
" syntax is used
either the left hand side or the right hand side may be
omitted (but not both) in which case the local user name and
".host
" are implied.