systemd is a vital init system that is integrated tightly with many popular Linux distributions out there. It provides a system and service manager th

Systemd Looks to Replace sudo with run0

submited by
Style Pass
2024-06-23 02:30:04

systemd is a vital init system that is integrated tightly with many popular Linux distributions out there. It provides a system and service manager that runs just after the Linux kernel initializes, acting as the first process on boot (PID 1).

Of similar significance is sudo, a program that many of you might already be aware of. It lets users with a lower level of security privilege run commands as root to accomplish tasks that they otherwise couldn't perform.

With a recent post on Mastodon, the creator of systemd, Lennart Poettering, announced an alternative to sudo called “run0” which aims to address a few pitfalls introduced by sudo.

Introduced as part of the upcoming systemd 256 release, run0 is a new tool that is a symbolic link used to fire up an existing tool called “systemd-run”. With this, you can expect similar behavior to sudo, but with the key difference of it not being a SUID binary.

How run0 works is that it sends a query to the service manager to execute a command under the user's UID. It then allocates a new PTY for that and transfers the data both ways from the initial TTY to the newly created PTY.

Leave a Comment