[systemd-devel] starting processes for other users

Lennart Poettering lennart at poettering.net
Thu Aug 6 01:56:58 PDT 2015


On Mon, 03.08.15 03:29, Spencer Baugh (sbaugh at catern.com) wrote:

> Colin Guthrie <gmane at colin.guthr.ie> writes:
> 
> > 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.
> 
> Is there a tool like su that does do that? That is, a way to switch from
> root to another user without authenticating, that does start a PAM
> session and register with logind and all of that. That's something that
> would be useful, if it's possible...

There's SSH.

That said, I think we could probably beef up "machinectl login" to
also work on the local host, instead of just a container, providing
precisely what you are asking for.

Also see:

https://github.com/systemd/systemd/issues/825

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list