Am 02/05/2016 um 10:51 AM schrieb Boris Kolpackov:
> Package: systemd
> Version: 215-17+deb8u2
> Severity: normal
> 
> Hi,
> 
> I keep seeing in various places (Debian-related and otherwise) that
> su does not start a new systemd user session because it is not a
> proper login. The symptom is:
> 
> # su -l boris
> $ systemctl --user status
> Failed to get D-Bus connection: Connection refused
> 
> To me, it seems su -/-l/--login is just like login (what is the
> conceptual difference between su -l boris and ssh boris@127.0.0.1?).
> It also does not attach to a (lingering) user session, unless I
> manually do:

It was pointed out to me via IRC, that what I said so far is most likely
incorrect:

> <ansgar> mbiebl: su doesn't create new logind sessions.
> <ansgar> (Nor su -l)
> <ansgar> It might create one if started outside an existing session, but "su 
> -l", for example, gnome-terminal in a X session doesn't start a new logind 
> session.
> <ansgar> And just "su" even leaves the broken XDG_RUNTIME_DIR of the original 
> user in the environment.
> <ansgar> IIRC systemd upstream said that su should not start a new session 
> accroding to POSIX, but I doubt that refers to either PAM or logind sessions, 
> but just to not calling setsid()
> <ansgar> https://github.com/systemd/systemd/issues/825#issuecomment-127917622
> <grawity> pam_systemd is mostly a no-op even if su does call it

That su -l does start a new logind session here (with v228 and under X
only) is probably unexpected behaviour.


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to