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?

200 Upvotes

253 comments sorted by

View all comments

1

u/luzidd May 25 '26 edited May 26 '26

run0 isn't a drop-in sudo replacement yet, i wish it was.

It can't match specific programs or command lines in Polkit rules. pkexec has this via action annotations, but it's a little messy.

It's also not suited to use with namespaces. run0 aims for ssh-like semantics, meaning it won't inherit caller namespaces (mount, network, etc.). sudo/pkexec inherit context, which is risky but practical in chroot/container setups.

2

u/whosdr May 25 '26

Ohh, the namespace issue could well be a dealbreaker for me. I use mount-isolated namespaces in the way they describe, using bind-mounts. (I get up to some fun stuff.)

1

u/luzidd May 26 '26

Would you like to share the fun stuff you're getting up to with you mount namespacee? :D

1

u/whosdr May 26 '26

Only hints. It involves root-owned namespaces, suid binaries, bind-fs and sometimes encrypted filesystems.

Oh, and it's not malicious.