<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 29, 2017 at 11:09 PM, Matt Hoosier <span dir="ltr"><<a href="mailto:matt.hoosier@gmail.com" target="_blank">matt.hoosier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br>
</div></div>The approach that you and Pekka most recently put on record here:<br>
<br>
* User=foo<br>
* PAMName=weston<br>
<br>
with a /etc/pam.d/weston that just does minimal stuff (enforce the<br>
account exists and then execute pam_systemd.so for the session phase)<br>
works well for me.<br>
<br>
One thing I can't figure out though: using PAMName= causes the service<br>
process's journal entries emitted by regular stdout and stderr not to<br>
be visible with 'journalctl -u weston.service' anymore. Only the<br>
messages coming internally from systemd ("Started Weston." and<br>
similar) show in that journal.<br>
<br>
I've tacked in StandardOutput=journal and StandardError=journal to<br>
compensate for the StandardInput=tty-fail. The messages do make it<br>
across to journald; you can view them with 'journalctl<br>
/usr/bin/weston'. But somehow they're not associated with the system<br>
unit weston.service anymore. Does using the PAMName= directive cause<br>
the stdout/stderr messages to be reassigned to a user-session unit or<br>
something?<br clear="all"></blockquote><div><br></div><div>No, it's done by pam_systemd specifically.</div><div><br></div><div>The main purpose of pam_systemd is to create a user session and move the process to the session's own cgroup (from the weston.service cgroup). As a result systemd no longer considers it as belonging to the weston.service unit, but to session-c123.scope or such.)<br></div><div><br></div><div>(The same happens with all other interactive login types -- e.g. when you log in at the console, you get moved out of getty@.service and into your own cgroup.)<br></div></div><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div>
</div></div>