The Ubuntu 26.04 Rust sudo is not compatible with standard sudo
utcc.utoronto.ca
utcc.utoronto.ca
my weekend project is moving them over to debian.
it pains me, ubuntu used to be “the” linux i would point people to. the “un-fuckup-able” thing people should try if they’re switching.
It’s called pay attention and f*king upgrade your packages.
I don't understand the behaviour behind "the language I'm using is better than X because it has option M and N"
I was there not so long ago when Java was supposed to replace everything, and then C# came, and then Go but my pay was still handled by COBOL that was also supposed to be better.
Programmers have some hyper optimization disease where they don’t see things clearly.
Whereas on the RPM side Fedora is pretty good for desktop and something like RockyLinux for your servers (essentially carries on the spirit of the old CentOS).
Then again, I never really needed any of the more fancy modern distros, most of the time I just need good LTS and to run Docker, many might prefer Podman.
Impressions:
1. Installer a bit rough. Tried both "graphical" and curses modes: Both truncated partition-specific strings from the manufacturer's Windows setup. No contextual help; wiki seemed out-of-date.
2. Good choices for initial packages; good apt speed from default server.
3. Firefox base version is four months old -- but is a ".7", so maybe seven rounds of bug fix backports? Ubuntu FF snap version on old hardware is by contrast a ".0", tracking much more recent upstream. Which mostly seems to get me a lot of annoying confections and semi-weekly demands to restart for the new version -- after each of which I must then manually repopulate GNOME's desktop workspaces.
4. Snap-induced clutter of home dir and filesystem utility output is gone! Loving that part.
Are you know running debian with testing or unstable?
So you're moving from a distro that's being wrecked by ideologically-driven decisions, to one that is almost entirely ideologically motivated and notable for internal drama. Great choice, best of luck.
Still wouldn't switch to another distro anytime soon, you know, sunk cost fallacy and all that.
I am struggling to remember, but the last time I tried Debian a year ago there was a lot of setup and a few things broken (I think it was outdated packages). One of the things I tried to setup was a RAID array which was a very involved experience. It felt like things were not being tested. While on RHEL it was a simple point and click in Cockpit.
Backports are quite variable. Distro packaging systems are really awkward for software from language ecosystems with many dependencies. I end up having to install a static build of podman if I want a recent version. A backport basically seems impossible.
However running a testing install can result in a broken system after an apt upgrade and it can stay broken for some time while fixes work their way in from unstable.
At least the command is still called sudo or run0. Changing it to doas would have been a much more breaking change.
Alas, TFA blocks me with no workaround because I'm using Tor Browser so I can't read about the nature of the changes.
"if you want people to use open chat protocols, you need to make user-friendly clients"
"we already have irssi"
the vast majority of people abandon IRC for discord
shocked Pikachu face from the free software community
Where is this GPL-licensed sudo that already exists?
They are slow-rolling the cancellation of Stallman's connection to the OS because their first attempt failed.
In 10 years, no one will have heard of GNU after all components have been replaced with corporate clones.
LLVM was always trying to pitch itself as a whole-lifetime optimization system. In practice, this meant focusing on LTO and PGO compilation modes. The idea of runtime or idle-time optimization were always kind of a next-todo step rather than anything actually implemented.
sudo-rs is MIT-licensed: https://github.com/trifectatechfoundation/sudo-rs/blob/main/...
Perhaps you are thinking of uutils? https://github.com/uutils/coreutils/blob/main/LICENSE
GPL would be ideal, MIT is okay, but in our new AI-powered future, we may not even need the source code:
https://bramble-apps.github.io/
Maybe all software will become open source or free software?
For that reason I suggest switching to any other distribution. Of the ones I have interacted with, I have had good experiences with all of them.
Great, then give it a new name.
> At least the command is still called sudo or run0
You're happy it's a knockoff?
> would have been a much more breaking change
All these "Rust rewrite" projects are creating breaking changes all over the place, whilst solving no real problems. They can shove them up their arses.
Starting anew WILL introduce new bugs. This is a statistical certainty.
Most Rust rewrites are justified upon imaginary boogeymen. The complex security nightmares of 'cp' 'ls' and 'rm' were begging for a new design.
[1] Other than the language itself.
Same goes for C, it's reliance on weakish type system is what causes its numerous fuckups.
If you forget to do it in rust (or zig, or typescript, or any of the hundreds of languages with option types), your code doesn't compile.
Nothing precludes "simply do not fall off" when working off heights, either, but there's a reason safety harnesses are mandatory when working at heights in most of the developed world.
If you're just pissed and trying to blow off steam, maybe this choice of words will help a bit, but because of the issues described above, it also might just cause a bunch of people to react negatively towards you and therefore make your mood worse.
If you're just commenting here as something to reference in the future for when you expect to say "I told you so!" to everyone, I guess this is a reasonable way of doing it. It still doesn't really seem like there's much need for phrasing it like that though; people still might look back and think that you're right but still sound arrogant and entitled.
There's a strong principle in upstream Linux kernel about "You don't break userspace"[1], that I really wish more folks would get into their heads, but most especially a variant "You don't subtly break userspace".
If you're going to replace an existing binary, under the same name, you need to be like-for-like in commands, even if your guts are completely different. Very few people give a damn about how it's actually implemented, just does it do what they need it to do.
If you want to do things differently, do it under a different name and have it be an explicit break for an end user by not shipping with the original and let people choose to install it if they really don't want the new thing. Breaking things subtly is completely unacceptable.
[1] espoused really clearly, as part of an infamous rant https://lore.kernel.org/all/CA+55aFy98A+LJK4+GWMcbzaa1zsPBRo...
Besides that userspace has been incompatible between distros for at least 30 years because everyone has that one special patch the library needs on their distro that isn't accepted upstream and breaks things beyond repair.
This was already the case in the 1990s when Applixware shipped 30 different versions of their software on one CD-Rom because it should run on different distros and their versions.
And back then there weren't that many, mostly Red Hat, SuSE and Debian.
Every time Rust is mentioned, these mythical zealots are mentioned. Yet somehow they never seem to actually show up. Most elusive!
Are they with us in this room right now?
I hope this copy works https://pastebin.com/mxAZyQJL (I was surprised the website even blocked archive.ph with "suspicious old browser")
The sudo-rs 'sudoers' manual page suggests that this is a deliberate decision, which makes the Rust version of sudo very definitely not a compatible implementation. The manual page has a nice full section and description of 'Wildcards', and then at the end casually says:
> Wildcards in command line arguments are not supported—using these in original versions of sudo was usually a sign of mis-configuration and consequently sudo-rs simply forbids using them. The only supported use is ‘*’ as the final argument to indicate “zero or more subsequent arguments as noted above.
The manual should probably drop the wildcards section it's not implementing anyway, though.That’s right. “A regression”
Whether it was accidental or purposeful changes nothing.
If I install and setup and run "sudo" I expect it to work like sudo.
If you want your program to not work like sudo do not call it "sudo". This is what the OpenBSD folks did with doas.
POLA.
(It's fine if they want it to work differently than sudo; not fine that they called it "sudo".)
You can install it in replacement as sudo on Linux.
the other half of the problems are from people who think redesigning the wheel is a good idea and try to wedge conformity-breaking tools into the thing.
It's 100% compatible to find plus some additional features. That's why it mentions find's manual for the basics and only points out what was added on top in its own manual.
If you want something similar but simpler, go for doas.
If you need all the features in sudo, keep using sudo.
If you want to try new security models, try s6-sudo, or any other of various tools out there.
sudo-rs keeping the same name is actually a worse breakage — because it doesn't have the same API as sudo (as described by op), but has the same name and pretends to be a drop-in replacement while also not being a drop-in.
Virtue signaling.
And remember that sudo was itself a replacement for earlier tools like su. It has no special claim to be the one and only tool for the job.
"Canonical's Jon Seager mentions that the sudo-rs developers are collaborating with Todd Miller, the original maintainer of sudo, and to think of sudo-rs as a "handshake across generations of secure systems".
He also added that sudo-rs is not expected to bring over all the features of sudo, as the devs are taking a "less is more" approach, excluding features that are too niche or outdated."
So sudo.rs drops some features because "less is more", but it's still called "sudo" because by working together with the original maintainer they capture the spirit of the original, a "sudo 2.0" so to speak.
Except when the change of features are seemingly arbitrary. As the article points out when it comes to regexes, the following is not allowed:
/usr/sbin/exim -bp[acru]
but the following would be /usr/sbin/exim *
So, as the author notes:> The Rust sudo has apparently opted to keep the single most dangerous wildcard while disallowing all of the wildcards that allow one to be narrow and specific about what you're allowing […]
If the goal is a safer system: WTF?
Slot screws date back to the ~15th century, Phillips to the 1930s, and Torx to the 60s. They all brought improvements.
But Torx does not call itself "Phillips": you know the difference and plan accordingly.
Calling something "sudo" and then not working like sudo is the problem.
Sudo used to be in OpenBSD, but they found it too troublesome (at least as a default) so they created something else / 'better' for their needs: they didn't call it "sudo", they called it "doas", because it did not work the same way as sudo.
A transition period with warnings and logs, changes and key differences at the top of the man docs and helpers to find, migrate or at least fail loudly. These are all important bring everyone along, and vital to transition a critical tool like sudo.
Meanwhile FOSS OSes keep cloning UNIX.
However Ubuntu's approach to rewrite proven CLI tools into cool new language wasn't necessarily the best idea to do another RIIR.
Except sudo-rs did not remove them.
As the article points out when it comes to regexes, the following is not allowed:
/usr/sbin/exim -bp[acru]
but the following would be: /usr/sbin/exim *
As the author notes:>> Wildcards in command line arguments are not supported—using these in original versions of sudo was usually a sign of mis-configuration and consequently sudo-rs simply forbids using them. The only supported use is ‘’ as the final argument to indicate “zero or more subsequent arguments as noted above.*
> The Rust sudo has apparently opted to keep the single most dangerous wildcard while disallowing all of the wildcards that allow one to be narrow and specific about what you're allowing […]
If the goal is a safer system: WTF?
> Also, this is documentation calculated to mislead busy system administrators who are skimming it to see if there is some big difference between the Rust sudo that Canonical has stuck them with and the real version of sudo.
just.. wow.
%corestaff ALL=NOPASSWD: /usr/bin/mailq "", \
/usr/sbin/exim -bp, \
/usr/sbin/exim -bpa, \
/usr/sbin/exim -bpc, \
/usr/sbin/exim -bpr, \
/usr/sbin/exim -bpu
That being said there definitely should be an automated way to check for incompatibilities between normal and rust sudo.> That being said there definitely should be an automated way to check for incompatibilities between normal and rust sudo.
yes. it’s called the bare minimum.
Yeah, no.
You either use `sudo` when you want full root access or for something completely trivial.
A more robust design is to have a systemd one-shot unit that users can activate (via a trigger file or sudo).
So my point still stands and your example illustrates it perfectly. Either you use `sudo` for full root access or for something entirely trivial.
With NOPASSWD you would also invite someone pulling a `.deb` via `curl` as part of a supply chain attack in a some non-descript NPM package via a git hook or something.
Or one could just install (real) sudo instead of (fake) sudo.
Installing real sudo is something I will have to do when (if) we move to 26.04 because we need LDAP functionality, and fake sudo does not provide that.
Individuals can deal with that, but companies will have a hard time. You would think the Linux Foundation (LF) would chime in with all these differences. But they seem more concerned with AI than Linux these days.
If it was up to me, I would standardize on OpenBSD's doas, but me doing that would make for more incompatibilities.
That happened 30 years ago. Userland is not compatible. Too many distro related patchese, especially on Debian/Ubuntu.
The only common denominator is libc because daddy Torvalds doesn't allow the kids to break it. That's why things like snap work but come with a full blown os stack inside.
doas is ~ 1k LOC of easy to understand C code. It can quite literally be made 100% bug-free.
But it was never about that, never about finding a better replacement. It's about religious proselytizing of their chosen language.
I remember 20 years ago Ubuntu was marginally more user friendly. Is it the power of inertia? Ubuntu is just Debian actively made worse.
Also, Gnome and KDE are both horribly unintuitive for newcomers. Ubuntu makes a several tweaks to Gnome to make it more user-friendly. Debian just gives a list of names and says to choose one or more.
It is mostly just inertia though.
So it can't be that much of a hurdle.
Agree on all other points though. Ubuntu's take on the Gnome interface is what makes it usable. Stock Gnome is just too barebones.
I started off with Ubuntu in the 2010s because I wanted to try out Linux but was sure as hell didn't have the patience nor resources to make consumer conveniences like WiFi just work. The local LUG was also heavily promoting it; that's even more inertia.
Then I got fancy and started really customizing my configuration---I got a dotfiles repo. The oldest commit touching a top-level file in my dotfiles is 11 years ago (almost unthinkable to me!). I haven't really tried it out on any other distro but I'm pretty sure I've written some shim or personal bash command relying on something Ubuntu-specific.
I happen to be in the market for a new laptop right now. I'm looking at Starlabs but unfortunately they do not ship with Debian. Today, however, I saw a random woman in a cafe with Linux Mint so that might be my sign to investigate that ecosystem.
Never been happier.
I want the simplest possible experience. There is more documentation for Ubuntu, which means things are more likely to work. Or if they don’t work, someone might have posted about the issue.
sudo being slightly different doesn’t make a difference for me when my laptop experience of sudo is “sudo apt …”.
The GPU and unified memory is great though.
Despite that it was just upgrade to new OS version and SSD replacement.
Though one of servers is getting upgraded to Debian from Ubuntu adware.
I should note I am a Debian diehard been using it 20 years my main workstation is still on deb12 lol. But recently I have been pivoting away from Debian and towards Fedora. Running Fedora 44 on my Framework 13 Pro and my Chuwi N150 netbook and it has been very stable and pleasant. Relatively cutting edge, too. I am on KDE 6.8 for instance.
dima@shorty:~$ rmadison python3
python3 | 3.9.2-3 | oldoldstable | amd64, arm64, armhf, i386
python3 | 3.11.2-1+b1 | oldstable | amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
python3 | 3.13.5-1 | stable | amd64, arm64, armel, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.14.7-3 | testing | amd64, arm64, armhf, i386, loong64, ppc64el, riscv64, s390x
python3 | 3.14.8-1 | unstable | amd64, arm64, armhf, i386, loong64, ppc64el, riscv64, s390x
dima@shorty:~$ rmadison -u ubuntu python3
python3 | 3.4.0-0ubuntu2 | trusty | amd64, arm64, armhf, i386, powerpc, ppc64el
python3 | 3.5.1-3 | xenial | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
python3 | 3.6.5-3 | bionic | amd64, arm64, armhf, i386, ppc64el, s390x
python3 | 3.6.7-1~18.04 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x
python3 | 3.8.2-0ubuntu2 | focal | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.10.4-0ubuntu2 | jammy | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.10.6-1~22.04 | jammy-security | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.10.6-1~22.04.1 | jammy-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.10.6-1~22.04.2 | jammy-proposed | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.12.3-0ubuntu1 | noble | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.12.3-0ubuntu2.1 | noble-security | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.12.3-0ubuntu2.1 | noble-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.12.3-0ubuntu2.2 | noble-proposed | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.14.3-0ubuntu2 | resolute | amd64, amd64v3, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.14.7-3 | stonking | amd64, amd64v3, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.14.7-3 | tenacious | amd64, amd64v3, arm64, armhf, i386, ppc64el, riscv64, s390x
python3 | 3.14.8-1 | tenacious-proposed | amd64, amd64v3, arm64, armhf, i386, ppc64el, riscv64, s390x
The ubuntu server reporting this is super slow (one of a million paper cuts you suffer when you use ubuntu instead of debian). The latest Debian stable has 3.13.5 as you say. The latest ubuntu lts release (i.e. what anybody actually uses) was released a year later, and has 3.14.3. Next summer, Debian will be ahead. Also note that the current bleeding-edge ubuntu is 3.14.8-1, which is exactly the same as the bleeding-edge debian. Because they're copies of one anotherIf you need to run a five year old version of [PHP|Apache|Nginx|Caddy|whatever], Ubuntu is a solid bet. None of that "we need to update our configuration to a new format to solve a criticial CVE issue" nonsense, for much longer than Debian is offering free labour.
Debian has its own flaws, like its controversial patches, lack of real LTS releases, and lack of business contracts guaranteeing support directly from the source if you're a business.
I have yet to encounter any issues with either sudo-rs or their coreutils rewrite. From what I've come to expect from utcc.utoronto.ca, I'm not surprised they're using some obscure feature that Canonical chose to remove, though. I'm surprised they're even running Ubuntu.
The first time I tried this was the last time I tried. It was ca. 2012 on an Acer laptop that I personally configured to dual-boot. My memory is not to be trusted but
- the biggest problem for me was that it asked for a core dump/logfile, which I agreed to, but for some reason or another it could not produce/extract said debug info and I got stuck in a loop of whoopsie trying and failing.
- smaller grievance (I might be wrong) is that I had to create some account (Launchpad?) in order to report the bug. Why can't it be anonymous?!
Everytime I turned this Acer laptop on, there will be 2-3 such prompts from Ubuntu that something report-worthy went wrong. You learn to blend it out like the cookie consent dialogs but still annoying. Plus, everything is still perfectly usable so it does seem like the OS is just making a mountain out of a molehill.
- "why would anyone want that?"
- "that bug is not possible."
- "it's working as intended."
The chown bug took 18 months to be fixed. The ls bug isn't fixed after 6 months. Sort was fixed in about 3 months.
There are hundreds of open bugs: https://github.com/uutils/coreutils/issues — the project clearly wasn't suitable for an LTS release.
https://debbugs.gnu.org/cgi/pkgreport.cgi?package=coreutils
It's normal to find hundreds of open bugs in large open source projects
I really should close some of them, e.g., 8559, since Gnulib, which we depend on, doesn't support IRIX anymore since it is EOL.
I feel like this is just ignoring the issues raised in the post, or saying “well, I didn’t use those features so I don’t care”.
You personally not caring is ok. The distro not caring is generating some hate.
I'm also of the opinion that sometimes change is good. The Linux world is held back by design decisions and quirks coded into ancient operating systems that have long since died.
Luckily for the people on old Ubuntu versions, Ubuntu 24.04 without the sudo-rs rewrite will be supported until May 2034 or May 2039 if you pay up. The sudo-rs people have about 7-8 years to fix any problems that might exist before you have to think about doing `sudo do-release-upgrade`.
Those days are likely done.
It's not a bug, it's a deliberate incompatibility, as noted by the article's author:
>> Wildcards in command line arguments are not supported—using these in original versions of sudo was usually a sign of mis-configuration and consequently sudo-rs simply forbids using them. The only supported use is ‘’ as the final argument to indicate “zero or more subsequent arguments as noted above.*
> I do not really have words for this. The Rust sudo has apparently opted to keep the single most dangerous wildcard while disallowing all of the wildcards that allow one to be narrow and specific about what you're allowing, and it buries this at the end of a section that devotes a bunch of words to describing functionality it doesn't have and doesn't support, with absolutely nothing else in that section to say this (either up front or in the descriptions of how all the wildcards would work if sudo-rs supported them, which it doesn't).
If someone tries to do an in-place upgrade to Ubuntu 26.04, sudo-rs could potentially be installed instead of 'regular' sudo, and now you have a potentially system with borked functionality.
> It's open source, so I think reporting bugs or submitting a PR is just good citizenship.
LOL, the author's very next weblog post:
> One reaction to my entry on how the Rust Sudo is not fully compatible with proper Sudo is that I should have filed a bug report about this behavior. One of the reasons I have not done this comes down why I was using the Rust Sudo, and in my view it's a wider issue with bug reporting in general. To put it simply, I am (or was) an involuntary user of the Rust Sudo, not a voluntary one.
[…]
> In a project centered view, all people using Rust Sudo 'should' report issues to the project because that's how FOSS projects improve (this is not really true, the project unquestionably only wants what it considers 'good' bug reports and will be unhappy about ones that, for example, revisit decisions it has no intentions of changing). In the people centered view, many people have not chosen to use the new Rust Sudo or the Rust Coreutils, they've been stuck with them by Canonical's decisions. These people are under no obligation to help out with Canonical's apparent project of improving these projects (or help out the projects themselves); the Ubuntu project does not get to make everyone using Ubuntu into obligatory bug reporters through its own choices.
* https://utcc.utoronto.ca/~cks/space/blog/sysadmin/BugReports...
> You're using a suspiciously old browser
m8 it's firefox mobile from two months ago, calm down
Canonical don't owe them anything. . I really think some people just need to keep their opinion to themselves.
Nobody's forcing you to use Ubuntu, a software that is free of charge by the way.
It's fine to disapprove of a decision. It's another thing to come with accusations and grudges like this post does.
It does something in bsd:
https://man.freebsd.org/cgi/man.cgi?ln
Returns error in gnu:
https://www.man7.org/linux/man-pages/man1/ln.1.html
No-ops the command and returns success in new Ubuntu:
https://manpages.ubuntu.com/manpages/resolute/man1/rust-ln.1...
Given that the selling point of the rust rewrite is gnu compatibility, you’d think they’d RTFM of the thing they were replacing, or at least fuzz the two to confirm identical side effects.
I’m increasingly considering just pretending Ubuntu doesn’t exist. It’s a clown show, and devuan is fine.
I got dumped to https://utcc.utoronto.ca/~cks/cspace-bad/cspace-old-browser.... trying to visit the page.