On Do, 25.07.19 14:20, Mantas Mikulėnas (graw...@gmail.com) wrote:

> Take a look at `journalctl -o verbose SYSLOG_IDENTIFIER=su _PID=38464`.
>
> I suspect the messages *are* in the journal, just not tagged with
> UNIT=kafka.service anymore. In some distros, `su` is actually configured to
> call pam_systemd and set up a new systemd-logind session – when this
> happens, the process is moved out of kafka.service into a user session
> scope, and its syslog messages are grouped accordingly.

It shouldn't just be "some distros" btw, it hopefully should be
all. Everything else would be a bug.

> Consider replacing `su` with `runuser`, or indeed with systemd's [Service]
> User= option.

"runuser" creates a PAM session too. "setpriv" is the command to use.

(Yes don't ask me why we have all three of su, runuser and setpriv
being different but also the same...)

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to