From b755d6b7221f3a7cec8f190a12f920065427f537 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Jan 2026 12:43:34 -0500 Subject: [PATCH] (post-update): New Year, New sudo: using systemd's run0 as a sudo replacement Clarify the setuid situation for polkit --- ...-year-new-sudo-using-systemd-s-run0-as-a-sudo-replacement.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2026-01-01-new-year-new-sudo-using-systemd-s-run0-as-a-sudo-replacement.md b/_posts/2026-01-01-new-year-new-sudo-using-systemd-s-run0-as-a-sudo-replacement.md index 660cc8e..e8868b7 100644 --- a/_posts/2026-01-01-new-year-new-sudo-using-systemd-s-run0-as-a-sudo-replacement.md +++ b/_posts/2026-01-01-new-year-new-sudo-using-systemd-s-run0-as-a-sudo-replacement.md @@ -16,7 +16,7 @@ excerpt: systemd 256 introduced run0, a new tool that can be used as a sudo repl systemd 256 [introduced](https://github.com/systemd/systemd/commit/7aed43437175623e0f3ae8b071bbc500c13ce893) `run0`. It isn't a new tool per se, but rather a symbolic link to `systemd-run` that changes its behavior to run commands as root, similar to `sudo`. Some of the motivations to replace `sudo` with `run0` are: - `run0` doesn't rely on the [setuid](https://en.wikipedia.org/wiki/Setuid) bit. -- `run0` uses [Polkit](https://github.com/polkit-org/polkit) for authorization and privilege management. **Note:** polkit removed the need for the setuid bit on `/usr/lib/polkit-1/polkit-agent-helper-1`, which was the only component that required it and now uses an IPC socket-activated service for safe privilege escalation. See: [Debian](https://salsa.debian.org/utopia-team/polkit/-/commit/be1d882c785bf05b70d0e606710df94aa54766cc) and [ArchLinux](https://gitlab.archlinux.org/archlinux/packaging/packages/polkit/-/commit/f2e63152919a4a8070ad241b84ad670db3deaf4f) changes. +- `run0` uses [Polkit](https://github.com/polkit-org/polkit) for authorization and privilege management. **Note:** polkit removed the need for the setuid bit on `/usr/lib/polkit-1/polkit-agent-helper-1`, which was the only component that required it and now uses an IPC socket-activated service for safe privilege escalation. See the [Polkit change](https://github.com/polkit-org/polkit/commit/c007940054392b67b84b6044dda8a215040d8eb5) for more details. - `run0` can be used to run commands in a more controlled environment, with better isolation and resource management. - `run0` automatically integrates with D-Bus when running as a different user, making it easier to run commands that require D-Bus access (No more "Failed to connect to bus: No such file or directory" messages!). - `run0` can be used to run commands in transient systemd services, which can be useful for running long-running commands or services.