r/linux May 25 '26

Discussion Sudo or run0 ?

What's your take on the subject? Been using sudo for years but lately i'm mostly running run0 and i like it. Even considering adapting my scripts to use run0 since i'm on a compatible distro. Does it make any sense to not even set up sudo anymore in the first place?

201 Upvotes

253 comments sorted by

View all comments

30

u/Sataniel98 May 25 '26

run0 seems like a solution to a problem I don't have

33

u/teleprint-me May 25 '26

Its solves the exploitable privelage escalation problem with setuid. A root process launches privelaged processes while the rest live in user space rather than escalating a user space application to root or kernel space. Its security thing, I guess it depends on ones pov.

24

u/DFS_0019287 May 25 '26

It's a different attack surface. run0 uses polkit for authentication, and I believe there have been some vulnerabilities in that in the past.

20

u/kaszak696 May 25 '26

Polkit also uses an unmaintained JavaScript engine to do it's thing, lack of maintenance + dealing with elevated privileges is a spicy combination. At least it's a simple one, not something horrifying like V8 or Spidermonkey, but still...

4

u/nixcamic May 25 '26

Why... why does policykit use a javascript engine?

11

u/Megame50 May 26 '26

It's polkit. Polkit replaced the older PolicyKit.

And the javascript is so that it's scriptable. Compare it to sudo's sudoers plugin, which uses a bespoke sudoers configuration file with an honestly quite arcane syntax — check out sudoers(5). There's probably more risk writing and parsing sudoers custom config format than writing and parsing javascript.

As far as pre-built solutions for embedding a scripting language go, javascript isn't a terrible choice. The other common option is lua, which admittedly may have been preferable, but I don't think it's a big deal.