<div dir="ltr"><div><div>I guess the answer is "no." :)<br><br>This is Ubuntu 16.04. On CentOS7.3, pam_limits is part of systemd-user through system-auth<br><br>Here is /etc/pam.d/systemd-user from my Ubuntu system:<br><br><div style="margin-left:40px"># This file is part of systemd.<br>#<br># Used by systemd --user instances.<br><br>@include common-account<br><br>sessionĀ  required pam_selinux.so close<br>sessionĀ  required pam_selinux.so nottys open<br>@include common-session-noninteractive<br>session optional pam_systemd.so<br></div><br></div>So on RHEL systems, it doesn't matter that is works because user instances are officially not included and it just doesn't work on Ubuntu because pam_limits is not used by systemd-user.<br></div><div><br></div><div>I find it odd that two major distros differ in this behavior.<br></div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 20, 2017 at 9:23 AM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mo, 20.11.17 09:20, Jeff Solomon (<a href="mailto:jsolomon8080@gmail.com">jsolomon8080@gmail.com</a>) wrote:<br>
<br>
> Lennart,<br>
><br>
> Your explanation sounds great but it's just not what I'm seeing.<br>
><br>
> My user@.service has "PAMName=systemd-user" in the [Service] section.<br>
><br>
> I have setup limits for the user in /etc/security/limits.d/foo.<wbr>conf.<br>
><br>
> I have no other limit overrides in any other systemd file.<br>
><br>
> Whether I reboot or "systemctl restart user@<uid>" I see the same thing.<br>
> That is, the limits set through pam_limits are not respected.<br>
><br>
> I consistently see that if I login as that user, then "ulimit -a" shows the<br>
> values I expect from pam_limits while "cat /proc/<pid>/limits" for the user<br>
> instance process or its children do not.<br>
<br>
</span>Is pam_limits even enabled for the "systemd-user" PAM fragment on your<br>
distro?<br>
<div class="HOEnZb"><div class="h5"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
</div></div></blockquote></div><br></div>