What you're refering to as Linux, is in fact, Systemd/Linux, or as I've recently taken to calling it, Systemd + Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning Systemd system made useful by the Systemd corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX
When does systemd stop? Linux without it is increasingly looking unlikely in the future. Are we not worried about it being a single point of failure and attack vector?
This isn't a moan about the unix philosophy btw, but a genuine curiosity about how we split responsibilities in todays linux environment.
SystemD will consume the entirety of Linux, bit by bit.
In 2032, SystemD announces they're going to be introducing a new way to manage software on Linux
In 2035, SystemD will announce they're making a display system to replace the ageing Wayland
In 2038, the SystemD team announces they're making their own desktop environment
In 2039 SystemD's codebase has grown to sixteen times its size in the 2020s. SystemD's announces they're going to release replacements for most other packages and ship their own vanilla distro.
In 2045 SystemD's distro has become the standard Linux distribution. Most other distros have quietly faded away.
In 2047, SystemD announces they're going to incorporate most of GNU into SystemD. Outrage ensues from the Free Software Foundation, which vehemently opposes this move.
In 2048, Richard Stallman dies of a heart attack after attempting to clone SystemD's git repo. SystemD engages in a hostile takeover and all resistance within the FSF crumbles
In 2050, SystemD buys the struggling RedHat from IBM for $61 million.
In 2053, most world governments have been pressured into using SystemD.
In 2054, Linus Torvalds, fearing for his life, begins negotiations to merge kernel development into SystemD
In 2056, the final message on the Linux kernel development mailing list is sent.
In 2058, Torvalds dies under suspicious circumstances after his brand-new laptop battery explodes.
In 2060, SystemD agents assassinate the CEO of Microsoft.
In 2063, after immense pressure from SystemD-controlled human rights organisations, Arch developers discontinue development.
In 2064, the remaining living Debian developers release the next stable version of their clandestine and highly illegal distro.
One way to notice a person has "systemd derangement syndrome" is by looking at how they write systemd: if they write it SystemD they are already in late stages of SDS and it isn't curable anymore.
By this logic the Linux kernel is also a single point of failure and attack vector.
sudo isn't going away, so does doas.
run0 is just another alternative to use or not.
There are still distribution out there without systemd and if there ever won't be any systemd-free distributions left and systemd would become a critical part of the Linux ecosystem, then it would get the same treatment as the Linux kernel with many professional maintainers.
plus, it isn't like this isn't exactly like adding another "door" to the "systemd building". It's a modular component of systemd, so more akin to replacing the sudo building with a new, but still separate, systemd sudo building
@Olap
I agree. As someone who uses systemd on daily basis (I use Arch, BTW 😄) I really like it, but I am a bit worried about it being a single point of attack. Maybe just push doas as default instead? I never used doas but I watched few videos about it, so I guess it's fine and probably better than sudo (less bloated).
Just my few cents.
I don't see how something would be inherently easier to attack if it is called systemd-foo instead of just foo. Attack surface and vectors do not depend on which project develops a particular tool.
Systemd is a bit of a hassle to be rid off, but thankfully it's not actually that hard, the hardest part I found was converting systemd services to whatever init system I use.
I mean it should kind of already be something like GNU/SystemD/X11/PipeWire/Linux, I guess.
It's not like the GNU utils are the only massive integral part of the OS. I think GNU/Linux caught on squarely because many people follow Stallman, and that's how he wants people to refer to it.
It definitely made way more sense at early on. I mean GNU made most of UX of using Linux at some point. Systemd, and the browser now make a much bigger portion than before, and the world is more than GNOME now too.
Systemd isn't just an init system. It is a project with low level building blocks for a distribution. Most of the complaints are that it isn't just an init system, while it's not meant to be just an init system.
Not that I'm opposed to a better sudo alternatives, but I find it rather ironic that one of the reason stated is the large attack surface, considering systemd is a massive attack surface already.
There's a rewrite of sudo happening in rust, but he wants to throw out the SUID idea altogether?
when invoked under the “run0” name (via a symlink) it behaves a lot like a sudo clone. But with one key difference: it’s not in fact SUID. Instead it just asks the service manager to invoke a command or shell under the target user’s UID. It allocates a new PTY for that, and then shovels data back and forth from the originating TTY and this PTY.
That sounds like opening up the door to what windows is doing UAC and the wonderful vulnerability that the GOG Launcher had for privilege escalation.
I'm not a security researcher, but giving arbitrary users the ability to tel PID 1 to run a binary of the user's choosing is... probably not what Pottering is suggesting, but opens up to such vulnerabilities. And if it's written in C/C++ my trust is further reduced.
Giving users access to PID1 running binaries, giving users access to the kernel running binaries as root, I don't see much difference. SUID was notorious in the past for being leaky, it only ended when distros got serious about fencing use of it in, giving it only to programs actually needing it, making sure that they drop privilege properly, etc.
If anything I'm in the PID1 camp because it's more microkernely. But in any case broader userspace shouldn't really care about the mechanism, only have an API to do it and that API being a bit in the file permissions is soooo 1960s.
sudo is already an optional component (yes, really—I don't have it installed). Don't want its attack surface? You can stick with su and its attack surface instead. Either is going to be smaller than systemd's.
systemd's feature creep is only surpassed by that of emacs.
The problem is that those modules are packaged by the developers as opt-out rather than opt-in. It's a variation on Microsoft's old embrace-extend-extinguish playbook, only the "extinguish" part hasn't worked so well because there are some stubborn distros whose needs don't align with what systemd provides and have maintainers that go out of their way to provide alternatives.
(By contrast, although we may joke about emacs, it's the myriad of third-party extensions that cause it to just about be its own operating system—it doesn't all ship with the core.)
I'm not a fan of having root be able to actually login.
Even more so in a true multiuser env where I would rather have privilege escalation be more granular (certain user/groups can esculate certain actions but not others, maybe even limit options of a cmd).
Granted, in a true multiuser environment with an admin who's carefully tailoring /etc/sudoers to make sure everyone has the least possible privileges that will allow them to still do what they need, sudo is more secure. There's no doubt of that.
On a machine that has only one human user who's also the admin, and retains the default sudo-with-user-passwords configuration, su vs sudo is pretty much a wash, security-wise. su requires a second password to get root access, but sudo times out and requires the password to be re-entered while a shell created by su can stay open indefinitely. Which is more easily broken will depend on other details of your situation.
(If you're running an incorrectly configured ssh server that allows direct root login with only password authentification, having a root password could contribute to problems, but the correct fix there is to reconfigure the ssh server not to do something so stupid. I hope there's no distro that still ships that way out of the box.)
I'm no Linux expert, but I've never had any problems with sudo, it just works. Shouldn't systemd have higher priorities on their mind? This feels like change for the sake of change. And if this does happen, I sincerely hope that it just works, like sudo.
I think the article (or more Lennart Poertting post) explains it quite nicely. The problem with sudo is that the sudo binary itself has the ability to gane elevated privileges which is a potential attack surface
A lot (and I mean a lot) of criticism can be leveled at systemD. One of the upsides of it becoming popular is the standardization of much of things from the developers' perspective. It's easier to target multiple distros when you can rely on systemD's single implementation of the feature. Over the next decade, I forsee systemD eating more and more of the userspace, until you are only left with managing the differences between DEs and which display server they are using. We're already headed towards immutable base systems with apps shipping with their own dependencies, which we reduce the differences between distros even further.
If Canonical and RedHat weren't backing different horses (Snap vs Flatpak), I could see the app containerization system coming under systemD as well fairly soon. The Cosmic DE project uses functionality from systemD to overlay changes onto the system that are reversible, so that alpha versions of Cosmic can be tested without permanently changing the base system. Imagine apps shipping on whatever container runtime, and dynamically overlaying system-level changes as needed for things that tap into the host system via systemd-sysext.
that systemd is not one large thing, but a (large) collection of tools.
Who don't work without Systemd. And Systemd can't coexist with tools in the same repo doing the same job in a portable way.
I think Chimera was it (?) which tried to have Systemd and Runit and others in the same repo. With lots of wrappers and shims. Not because of Runit & co.
Right. That reminds of the time I was visiting a friend who had broken his Linux computer (No, not "apt-get remove --purge systemd" but they did something slightly similar). When I booted from a live Linux, used chroot and wanted to use configure networking : FAIL because systemd was ... not running. As he had no Internet because of his broken machine this caused some delays in fixing this but we got the job done eventually.
Kinda feels like writing a script that implements the sudo CLI but calls pkexec would be an easier way to do it. Given that so many systems already come with both sudo and pkexec, do we really need yet another option?
This is great. Not having the attack surface of sudo (and not even being a SUID binary) certainly are great additions.
And I hope people realize that systemd is not one large thing, but a (large) collection of tools.
XZ-utils rings a bell ? It was among others Debian wanting to pull in part of a systemd tool into openssh and that almost turned into a world wide disaster :(
I honestly started out not liking systemd at all, mostly due to the reports that it did waaay to much, but nowadays, I like the concept.
It is basically officially moving daemon management from a script-based approach to a table/database-based approach. That improves static analyzability, therefore increasing clarity, and probably even performance.
I agree that we should abandon scripts and move towards declarative software management, and abandoning sudo for a more declarative system seems like a good step to me.
Looking at the implementation, it doesn't really implement sudoers or tools like sudoedit in any way. systemd-run has already been an existing tool for quite some time and this is really just a different CLI for it. That tool asks systemd to make a temporary new service and immediately run it. That, in turn, requires blanket yes/no approval for org.freedesktop.systemd1.manage-units via polkit.
So with run0, you can either do everything or you can do nothing. In-betweens are just not a thing at the moment. There's very little new backend code running as root.
run0 bash should behave very similar to something like systemd-run --uid=0 --gid=0 --wait --same-dir --send-sighup --pty --pipe --collect bash and the majority of those options have been available for quite a while.
So I don't even use systemd myself I run OpenRC. Yet honestly I find the idea quite intriguing, having the service manager (PID 1) invoke the command seems like a cool idea to me.
It's not really a sudo alternative as much as it is another way of doing something similar.
But for why (I'm commenting this before reading) wouldn't it make more sense to home I'm the scope of systemd so it can be easier to maintain? Why have it do everything?
systemd is more of a set of products and software components branded under a single name rather than a single thing.
systemd itself is rather simple, as most other pieces systemd-* software, like systemd-boot, systemd-networkd and systemd-resolvd. these are usually more stable and less bloated than more popular alternatives
As long as they can work independently, yes. If they are modular and a distro admin (or just a computer admin) can choose to install and use systemd-x but not install or use systemd-y, we are in good business
Now if you have to take a few you don't like or need to use so that the one component you do want works, then no
I honestly don't know enough of systemd to say either way
I can understand that it makes it easier to add changes that would benefit systemd and distros in general. I read that they introduced run0 to solve long shortcomings of sudo (I'm not aware of which). That sounds logical.
Well... Poettering will eventually work his way up to browser engines and then we'll get something efficient... Here's the announcement:
"There's a new component in systemd, called "engined". Or actually, it's not a new component, it's actually the long existing "WebKit" engine now done properly. The engine is also a lot more fun to use than "WebKit" or "Blink" because you can finally have hundreds of tabs open in your browser without running out of RAM.
Even when that releases, it doesn't mean distros will switch to it. Just because it's systemd, doesn't always mean it's better. Just look at network manager vs systemd-networkd. Correct me if I'm wrong but afaik they are made to serve the same purpose and most distros prefer Network Manager over systemd-networkd.
Honestly, though, NM is useless on a server or VM. I don't know why they still have that kludge installed on 90% of machines.
Having said that. Lennart's Cancer is junk from junk process. It WILL be adopted by every distro but PCLinuxOS because no other distro is putting effort towards stability and reliability.
I'd hoped that moving to Microsoft would allow IBM to re-evaluate the shit shoveled into its declining enterprise product, but that's not looking likely given staffing and IBM's ancillary priorities. RHEL only needs to be Good Enough so it can sell certs and classes and AAP and other make-work.
invoking them is kind of a pain, my sole experience with it was meson/ninja using it but then that default was removed and I've never been able to put it back to satisfy my curiosity of how it's done
homed isn't exactly a home directory replacement, more of an extension. You can mix and match homed and normal home directories like you want (on a per-user basis at least, not within a single user). It does have some nice things, such as user-password based encryption of the home directory, so the password is required to unlock it (no admin access) or automatically using subvolumes on btrfs.
However, distributions like Fedora will definitely be in the lead, judging by previous experiences and stories of adapting new Linux technologies and Systemd components.
I wonder if this is still true, now that he no longer works for RedHat, but Microsoft.
@starman
Systemd is nice. I miss GUI apps for #SystemD.
Permanent mounting a Network drive or creating new Services and inspect and modify is such a point.
There seems to be misunderstanding about what Wayland is.
Wayland is set of protocols. They are implemented by wayland servers (compositors) and wayland clients (applications) themselves. There is no single "wayland binary" like in the X11 days. Servers or clients may choose to implement or not implement a specific protocol.
I think wayland has potential but in it's current state it's just half baked. Once more protocols get merged, maybe in a decades time Wayland should be quite flexible and robust.
Maybe that could be a good thing, but only if the distros do not include sudo by default, the fact to have one thing to update to update more things is good in the security side! If it's well implemented I'm okay with it