On Sun, Sep 6, 2015 at 10:04 AM, Nico Kadel-Garcia <[email protected]> wrote: > On Sun, Sep 6, 2015 at 6:51 AM, Tom H <[email protected]> wrote: >> On Sat, Sep 5, 2015 at 10:42 AM, Nico Kadel-Garcia <[email protected]> wrote: >>> On Sat, Sep 5, 2015 at 4:52 AM, Tom H <[email protected]> wrote: >>>> >>>> systemd introduced "machinectl shell localhost" in systemd 225 that >>>> essentially does the same as "ssh localhost" from an env perspective. >>>> >>>> Since it's being rebased to 219 for SL 7.2, perhaps that command'll be >>>> included in SL 7.4 with a systemd 22x (or it might be backported at >>>> some point...). >>> >>> systemd's tendency to find a particular issue with a known, stable >>> toolkit and then bolt it onto systemd is scaring the tar out of me. >>> Attempting to replace su or sudo seems to be yet another example of >>> this. The subject has been discussed, heatedly, in the Fedora mailing >>> list. >> >> AFAIR there was a systemd-devel@ thread and various bug reports about >> people having a problem with su/sudo when using them to launch X apps >> because XDG_RUNTIME_DIR was the su-ing/sudo-ing user's and perms of >> XDG_RUNTIME_DIR or of its contents were being changed to root because >> that directory couldn't be changed within a session. >> >> So the problem's that su doesn't create a new login session but su was >> never intended for this. Its man page even says "The su command is >> used to become another user during a login session". > > Right. "su" doesn't. "sudo" can, by setting /etc/sudoers or > /etc/sudoers.d options.
I don't think that sudo can create a new session where "session" corresponds to the consolekit/logind meaning, but I'd have to read "man sudoers" to be sure.
