[systemd-devel] starting processes for other users

Colin Guthrie gmane at colin.guthr.ie
Sat Aug 1 07:26:36 PDT 2015


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.


Ultimately, you'll always be able to do bad things here and have process
for the wrong users in sessions if you use this kind of approach (same
for setuid binaries). The trick is to avoid doing these things if this
is not what you want! :)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list