That "answer" is dishonest. I only needed the first point to reach that conclusion. It is supposed to be about "su command replacement", what leads to believe that 'su' should not be used on systems with systemd. According to the author: "[Lennart Poettering] explains that 'you can use su and sudo as before, but don't expect that it will work in full'", what leads to believe that systemd has forced 'su' to lose features. One click on the provided link and you discover that the author removed the last four words in Lennart Poettering's sentence, which is, in full:

Well, you can use su and sudo as before, but don't expect that it will work in full, because it never did.
https://github.com/systemd/systemd/issues/825#issuecomment-127957710

Lennart Poettering explains:

['su' is] supposed to open a new session and change a number of execution context parameters (uid, gid, env, ...), and on the other it's supposed to inherit a lot concepts from the originating session (tty, cgroup, audit, ...). Since this is so weakly defined it's a really weird mix&match of old and new paramters.
https://github.com/systemd/systemd/issues/825#issuecomment-127917622

That part is, again, stripped out from a quote in Stack Exchange's answer. The quote only keeps the statement that follows: "su is really a broken concept", as if that blunt affirmation was not justified. How honest is that?

Notice that 'man su' does not say otherwise:

The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the superuser.

'machinectl shell' does *not* "replace" 'su'. 'su' works exactly the same whatever the init system, including systemd. 'machinectl shell' is a new feature. Nobody is forced to use it. Unlike 'su', it provides a shell that inherits nothing from the originated session, i.e., the same shell the user would get logging in "normally".

https://wiki.debian.org/Debate/initsystem/ is good material to compare init systems: defenders of every popular init system argue in their respective favors and criticizes the other init systems. The arguments are mainly technical, harder to understand than lies such as "systemd replaces good ol' 'su'".

Reply via email to