⏱️ Reading time: 7 min
Jeff Geerling has been migrating his servers from Ubuntu 22 and 24 to Ubuntu 26 throughout the year, and on November 25, 2026 he documented that this migration breaks Ansible automation with no warning: his playbooks start failing with the error Timeout (12s) waiting for privilege escalation prompt as soon as the host runs Ubuntu 26.04 (source). The culprit is sudo-rs, the Rust rewrite of sudo that Ubuntu now enables by default in that release.
📑 En este artículo
- What is sudo-rs, and why is it already running on Ubuntu 26.04
- How the privilege prompt works, and what sudo-rs changed
- Why this breaks Ansible, pyinfra, and similar automation
- What this means for you if you manage servers with Ansible
- How to avoid the problem: upgrade, redirect, or postpone
- sudo-rs vs. classic sudo and doas
- When it’s worth waiting before migrating to Ubuntu 26.04
- References
What is sudo-rs, and why is it already running on Ubuntu 26.04
sudo-rs is a reimplementation of sudo written in Rust. Ubuntu adopted it as part of a broader push to rewrite system utilities that had lived in C for decades (source).
The sudo that sudo-rs replaces is the same one Geerling says he used for more than 20 years on his servers (source). It’s not a cosmetic fork: it reimplements the /etc/sudoers parser, PAM handling, and the authentication dialog itself from scratch, and that last part is exactly what breaks automation.
How the privilege prompt works, and what sudo-rs changed
When a tool like Ansible needs to escalate privileges on a remote host, it doesn’t open an interactive session for a human: it sends the command over SSH and waits for the exact text of the password prompt to appear in standard output before injecting the password. That coupling works as long as the prompt doesn’t change by a single letter, and it’s the same pattern Fabric or Capistrano use to automate sudo.
sudo-rs prints an extra line before the password prompt that classic sudo never showed (source). To a human, that line is invisible, barely a nuance. To Ansible, which matches against a fixed pattern, it’s an unrecognized prompt, and the process waits until it hits the configured timeout, 12 seconds in the case Geerling documented.
flowchart TD
A["ansible-playbook requests sudo password"] --> B["sudo-rs prints the extra line and the prompt"]
B --> C{"Ansible Core older than 2.22?"}
C -- "Yes" --> D["Timeout after 12s, the playbook fails"]
C -- "No" --> E["Ansible recognizes the prompt and the password is accepted"]
Why this breaks Ansible, pyinfra, and similar automation
Ansible isn’t the only one affected. pyinfra, another Python-based infrastructure automation tool, ran into the same problem and fixed it in version 3.11 (source). It’s the detail the initial discussion of the case doesn’t highlight: this isn’t a one-off bug in an Ansible plugin, it’s a contract change in a surface that any SSH-based automation tool assumed was stable.
The pattern repeats in both projects: each one had to touch its code to recognize the new prompt. There’s an open thread in the Ansible project to align the become plugin with sudo-rs (source), and the fix landed first in Ansible Core 2.22.0, with a backport on the way for the 2.16, 2.18, 2.19, and 2.20 branches, and possibly 2.21 as well (source).
What this means for you if you manage servers with Ansible
If you’re an SRE or DevOps engineer running an Ansible inventory with production hosts, the time to check this is before moving any machine to Ubuntu 26.04, not after. Confirm the Ansible Core version your CI pipeline runs: if it’s below 2.22 and your branch hasn’t received the backport yet, the migration can take down the nightly deploy without anyone noticing until the next morning.
For a team managing dozens of hosts with become and a sudo password, the cheapest short-term option is to pin the Ansible version before touching the operating system, test become against a staging host running Ubuntu 26.04, and only then plan the migration of both at once.
How to avoid the problem: upgrade, redirect, or postpone
The most direct fix is to upgrade the Ansible controller to Core 2.22 or later, or to the version of your 2.16, 2.18, 2.19, or 2.20 branch that already received the backport (source); at that point the become plugin already recognizes the new prompt and the password flow works again.
If you can’t touch the Ansible version yet, there’s a middle ground: tell the host to use the traditional sudo binary instead of sudo-rs for that specific connection, something Ansible’s own privilege escalation documentation lets you configure per host or per group (source). It’s also possible to roll back sudo-rs system-wide using Debian and Ubuntu’s alternatives selector, though that gives up the Rust rewrite for the whole host, not just for Ansible.
For those using pyinfra instead of Ansible, the fix is simpler: upgrade to version 3.11, which already includes the fix (source).
💡 Tip: before migrating a host to Ubuntu 26.04, run your playbook against a staging machine with the same Ansible version you use in production. If become with a password fails there, it will fail the same way in production.
sudo-rs vs. classic sudo and doas
sudo-rs isn’t the only alternative to the sudo everyone knows, and it’s worth placing it alongside the other two most common privilege escalation tools on Linux.
| Tool | Origin | Approach | What it means for Ansible |
|---|---|---|---|
| Classic sudo | C project by Todd Miller, the one Geerling used for more than 20 years | Supports the full sudoers syntax, PAM plugins, maximum compatibility | Stable prompt that Ansible recognizes without patches |
| sudo-rs | Rust rewrite that Ubuntu enables by default in 26.04 | Aims for memory safety, doesn’t yet replicate every detail of classic sudo’s dialog | Prompt with an extra line that breaks become up through Ansible Core 2.22 |
| doas | Minimalist, born on OpenBSD and ported to Linux | Single-file configuration, without the full set of sudoers rules | Doesn’t replace the sudo binary: Ansible treats it as a different become method |
The row that matters for this problem is the last column: doas doesn’t even try to be a binary replacement for sudo, so Ansible treats it as a different become method and doesn’t collide with this bug. sudo-rs, on the other hand, installs under the same command name as classic sudo, which is why the break goes unnoticed until someone runs an old automation against a new host.
When it’s worth waiting before migrating to Ubuntu 26.04
If your organization depends on Ansible or pyinfra pinned to an old version for compatibility with other collections or internal plugins, waiting for the backport to reach your branch is cheaper than debugging a timeout at 3 a.m. The same goes for CI/CD pipelines you don’t control directly, for example when a provider manages the runner and decides the OS version on its own.
Geerling also raises a deeper criticism: unlike Red Hat, which tests disruptive changes in Fedora first before they reach a production release, Ubuntu has no equivalent step before its LTS releases, which is why a change like sudo-rs lands directly on the servers people maintain for years (source). That’s his opinion, not a verifiable fact, but it explains why this kind of breakage shows up with no warning inside Ubuntu’s LTS cycle instead of getting caught earlier, in a test branch.
References
- Ansible Fails waiting for privilege escalation on Ubuntu 26, Jeff Geerling: documents the error, the open thread in the Ansible project, the fix in Ansible Core 2.22, the equivalent break in pyinfra, and the available workarounds.
- Official Ansible documentation on privilege escalation: explains how to configure become_exe and become_method per host or per inventory group.
- Official pyinfra repository on GitHub: the Python automation project that, according to Geerling, had to solve the same sudo-rs prompt problem in its version 3.11 (source).
Featured image: Foto de Kevin Ache en Unsplash
How each article is made (sources, testing and editorial criteria): How we work.
Did it work for you? Got a different error? Say so below: questions get answered and help the next reader.
Leave a comment
0 Comments