I am using lingering and I have issued "systemctl restart user@<uid>" and
then seen the instance restart with a new PID. So I think I am restarting
the user instance.

When Limit* directives are applied in "[email protected]" or in
"/etc/systemd/system/[email protected]/whatever.conf" I see that they are
respected in the user instance itself and the child processes it starts.

However, I do NOT see settings applied through pam_limits
(/etc/security/limits.d etc etc) respected in the user instance although
Mantas implied that I should. Is this expected?

On Mon, Nov 20, 2017 at 4:10 AM, Lennart Poettering <[email protected]>
wrote:

> On So, 19.11.17 16:57, Jeff Solomon ([email protected]) wrote:
>
> > > I didn't think that systemd paid one bit of attention to the settings
> > >> controlled by pam_limits?
> > >>
> > >
> > > The user@ instance runs user-controlled processes, much like cron
> would,
> > > so its service unit has PAM enabled as well.
> > >
> >
> > When I change pam_limits for a user via a file /etc/security/limits.d/,
> and
> > then restart the user instance, neither the user instance itself nor the
> > children of that instance are affected by those settings. OTOH, when I
> > login again as that user, that login session does have those custom
> limits
> > set.
> >
> > Based on your previous comment, I would have expected the user instance
> and
> > its child to show those custom limits. What did am I getting wrong?
>
> Note that [email protected] is only restarted if you fully log out
> (i.e. all your sessions) and then login back again. And only when it
> is restarted the new limits will be applied to systemd --user.
>
> if you use lingering, then not even this will work, since after all
> you declare that way that for your user the [email protected] instance
> shall stick around for system boot-up till shutdown. In that case,
> please just explicitly issue "systemctl restart user@….service" as
> root, so that the service is restarted.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to