<div dir="ltr"><div>Your problem is that you are listening to Lennart Poettering...</div><div>I cannot answer your question directly. However I am doing work at the moment with PAM and sssd.</div><div>Have a look at the directory which contains the unit files. Go on  /lib/systemd/sysem</div><div>See that nice file named -.slice    Yes that file is absolutely needed, it is not line noise.</div><div>Now try to grep on the files in that directory, since you might want to create a new systemd unit file based on an existing one.</div><div><br></div><div>Yes, a regexp guru will point out that this is trivial. But to me creating files that look like -.slice is putting your head in the lion's mouth.<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 June 2018 at 14:15, Maik Schmidt <span dir="ltr"><<a href="mailto:maik.schmidt@tu-dresden.de" target="_blank">maik.schmidt@tu-dresden.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
we're currently in the process of migrating from RHEL6 to 7, which also brings us the benefit of having systemd. However, we are observing problems with user applications that use e.g. XDG_RUNTIME_DIR, because SLURM apparently does not really run the user application through the PAM stack. The consequence is that SLURM jobs inherit the XDG_* environment variables from the login nodes (where sshd properly sets it up), but on the compute nodes, /run/user/$uid does not exist, leading to errors whenever a user application tries to access it.<br>
<br>
We have tried setting UsePam=1, but that did not help.<br>
<br>
I have found the following issue on the systemd project regarding exactly this problem: <a href="https://github.com/systemd/systemd/issues/3355" rel="noreferrer" target="_blank">https://github.com/systemd/sys<wbr>temd/issues/3355</a><br>
<br>
There, Lennart Poettering argues that it should be the responsibility of the scheduler software (i.e. SLURM) to run user code only within a proper PAM session.<br>
<br>
My question: does SLURM support this? If yes, how?<br>
<br>
If not, what are best practices to circumvent this problem on RHEL7/systemd installations? Surely other clusters must have already had the same issue...<br>
<br>
Thanks in advance.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Maik Schmidt<br>
HPC Services<br>
<br>
Technische Universität Dresden<br>
Zentrum für Informationsdienste und Hochleistungsrechnen (ZIH)<br>
Willers-Bau A116<br>
D-01062 Dresden<br>
Telefon: +49 351 463-32836<br>
<br>
<br>
</font></span></blockquote></div><br></div>