I tell people I generally don't use Linux because it's messy and changes gratuitously, and when people ask me to explain what I mean, I tell them as an example that any how-to, book, manual, or script that's meant for one version of Ubuntu is often likely to not work with the next version, unless or until the how-to, book, manual or script is updated.
If other distros plan on moving to sudo-rs that's one thing, but if it's just Ubuntu, maybe I should hop back to Debian for everything, and not just my cloud servers.
Speaking as a long-time Debian user, is there a compelling reason to switch to Ubuntu? In my casual (and possibly cynical) understanding, Ubuntu is just Debian plus a bunch of failed experiments like Unity, Snap, and whatever that proprietary init system was. There must be something about it, though, because it seems so much more popular than Debian.
So i really want to like Ubuntu, they push alternative CPUs, seem to have big input into RV32 for RiscV... actually, thats it. I can't think of any other reason to like them.
Mir, snap, upstart, coreutils to rust. Just a stench of not invented here. No, I can't think of any reason to use Ubuntu other than 'nothing else is available'
I used Ubuntu twenty years ago because it "just worked", giving me working WiFi for my laptop in college with minimal fuss. I remember trying Debian at the time and being bothered that all the software used some older versions.
Around ten years ago I switched to Debian, wanting something that was more stable. My WiFi still doesn't work out of the box but I know how to compile the driver and get DKMS working. I'm much more likely to be bothered these days by new features versus wanting to run the latest version of everything.
I briefly used Linux Mint for a desktop computer my kids use, but as long as I was managing it there was no usability benefit over Debian. I also used Ubuntu in a Docker container for a while, but only because I needed a newer version of a package and that was the path of least resistance. I switched that to Debian when debian:latest caught up.
I think there is a strong need for a distro that is easy for new users, but anyone who gets hooked on Linux will gravitate towards stable projects like Debian.
Apparently Ubuntu's been rewriting system utilities in Rust, and the sudo-rs version that ships on Ubuntu 26.04 has some incompatiblities with the sudo I've used on servers for 20+ years.
It prints an extra string before the password prompt, which sudo doesn't do, and that can confuse automation tools like Ansible that wait for a specific prompt.
Except that the output format of an established command is seldom a bug.
If you want to make a drop-in replacement for a utility, ensuring it responds in the same way is essential. You can do all you want to improve the internals, the documentation etc but why mess with the output?
Yeah no. I read the issue and it seems pretty reasonable. Ansible makes sudo's prompt into a string which contains a key, and then match on that string; meaning they use the --prompt option to turn Sudo's prompt into something like:
[sudo via ansible, key=spnnznrgscgdxdontsjkwrlyghiiglxk] password:
and then look for a line which matches that.
So when sudo-rs instead prints the line:
[sudo: [sudo via ansible, key=spnnznrgscgdxdontsjkwrlyghiiglxk] password:] Password:
then Ansible intentionally doesn't match that, because it doesn't match the intended, explicitly provided output.
And Ansible looks for the expected string at the start of the line, because some configurations cause every command that's executed to be printed, and they don't want to match a line like:
+sudo --prompt '[sudo via ansible, key=spnnznrgscgdxdontsjkwrlyghiiglxk] password:'
which you would get with e.g set -x.
So it's that extra "[sudo: " prefix which messes up the match; that's the "extra string" that sudo-rs prints before the prompt.
When I first read the part you quoted I assumed that Ansible just got confused by an extra line that sudo-rs prints, and I would've agreed, that's not very robust. But to me, it seems like Ansible has implemented this "wait for the sudo prompt" logic in a way that's impressively robust. I probably would've either done it in the same way or found a worse solution.
PAM allows an application to control the IO of the authentication conversation with pam_conv and suppress other messages with PAM_SILENT so it’s possible to rewrite the password prompt without grievous hacking around the PAM API. But it’s still pretty messy.
johnklos | 4 hours ago
I tell people I generally don't use Linux because it's messy and changes gratuitously, and when people ask me to explain what I mean, I tell them as an example that any how-to, book, manual, or script that's meant for one version of Ubuntu is often likely to not work with the next version, unless or until the how-to, book, manual or script is updated.
This is a perfect example.
caboteria | 5 hours ago
Speaking as a long-time Debian user, is there a compelling reason to switch to Ubuntu? In my casual (and possibly cynical) understanding, Ubuntu is just Debian plus a bunch of failed experiments like Unity, Snap, and whatever that proprietary init system was. There must be something about it, though, because it seems so much more popular than Debian.
miah | 5 hours ago
No. Stick with Debian unless you went half baked ideas and slow security updates.
greg_loscombe | 3 hours ago
So i really want to like Ubuntu, they push alternative CPUs, seem to have big input into RV32 for RiscV... actually, thats it. I can't think of any other reason to like them.
Mir, snap, upstart, coreutils to rust. Just a stench of not invented here. No, I can't think of any reason to use Ubuntu other than 'nothing else is available'
robalex | 3 hours ago
I used Ubuntu twenty years ago because it "just worked", giving me working WiFi for my laptop in college with minimal fuss. I remember trying Debian at the time and being bothered that all the software used some older versions.
Around ten years ago I switched to Debian, wanting something that was more stable. My WiFi still doesn't work out of the box but I know how to compile the driver and get DKMS working. I'm much more likely to be bothered these days by new features versus wanting to run the latest version of everything.
I briefly used Linux Mint for a desktop computer my kids use, but as long as I was managing it there was no usability benefit over Debian. I also used Ubuntu in a Docker container for a while, but only because I needed a newer version of a package and that was the path of least resistance. I switched that to Debian when debian:latest caught up.
I think there is a strong need for a distro that is easy for new users, but anyone who gets hooked on Linux will gravitate towards stable projects like Debian.
deivid | 54 minutes ago
Vendor support. Many hardware vendors only provide ubuntu drivers and immediately drop support cases if running something else
[OP] ema-pe | 10 hours ago
From the article:
This reminds me a lot of this xkcd comic: https://xkcd.com/1172/
gerikson | 10 hours ago
Except that the output format of an established command is seldom a bug.
If you want to make a drop-in replacement for a utility, ensuring it responds in the same way is essential. You can do all you want to improve the internals, the documentation etc but why mess with the output?
mort | 6 hours ago
Yeah no. I read the issue and it seems pretty reasonable. Ansible makes sudo's prompt into a string which contains a key, and then match on that string; meaning they use the
--promptoption to turn Sudo's prompt into something like:and then look for a line which matches that.
So when
sudo-rsinstead prints the line:then Ansible intentionally doesn't match that, because it doesn't match the intended, explicitly provided output.
And Ansible looks for the expected string at the start of the line, because some configurations cause every command that's executed to be printed, and they don't want to match a line like:
which you would get with e.g
set -x.So it's that extra "
[sudo:" prefix which messes up the match; that's the "extra string" thatsudo-rsprints before the prompt.When I first read the part you quoted I assumed that Ansible just got confused by an extra line that sudo-rs prints, and I would've agreed, that's not very robust. But to me, it seems like Ansible has implemented this "wait for the sudo prompt" logic in a way that's impressively robust. I probably would've either done it in the same way or found a worse solution.
[OP] ema-pe | 5 hours ago
Yep, reading the issue, it's much more complex than I thought. The only thing left is why sudo-rs changed how prompts are handled
mort | 5 hours ago
The issue seems to hint at an answer:
I don't know anything about the pam API, but it wouldn't surprise me if this "capturing and rewriting the pam password prompt" stuff is pretty messy.
fanf | 4 hours ago
PAM allows an application to control the IO of the authentication conversation with pam_conv and suppress other messages with PAM_SILENT so it’s possible to rewrite the password prompt without grievous hacking around the PAM API. But it’s still pretty messy.