[systemd-devel] starting processes for other users

Andrei Borzenkov arvidjaar at gmail.com
Mon Aug 3 00:35:25 PDT 2015


On Sat, Aug 1, 2015 at 5:26 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> MichaƂ Zegan wrote on 31/07/15 12:37:
>> The thing is, if the user does it, then after he leaves, the process
>> is running under the user's session.
>> If I log in to my own account, su to the other user and start the
>> process and then logout, this process, even though running as the
>> other user, is in my own session.
>> Actually it is sometimes confusing to see utmp entries saying
>> different things than loginctl ;)
>>
>
> Using tools like su is rarely doing what you expect. It doesn't start a
> new pam session and doesn't start  a systemd --user etc. etc.
>

If I read sources correctly, it happens only if audit is enabled,
which means under some configurations it does start new session. And
IIRC it does start new session at least when used in ExecStart - there
was a lot of discussion about it. So it does not look consistent.


More information about the systemd-devel mailing list