`sudo-rs` not supported
Describe the bug
I don't think it's a bug of pyinfra, but I wanted to report here in case other users have the same issue.
Ubuntu 25.10 changed default implementation of sudo to sudo-rs. However it seems that there are some issues when pyinfra require sudo to prompt user password interactevely failing with:
--> Preparing operation files...
Loading: deploy.py
[@local] sudo-rs: interactive authentication is required
[@local] Error: could not load fact: server.TmpDir
I've tested then to switch to old sudo implementation and everything work smooth.
To Reproduce
Use sudo-rs, and run a pyinfra command with __Sudo
Expected behavior
Same as sudo
Unfortunately sudo-rs is not currently supported because they didn't implementing a bunch of commonly used flags/etc for reasons I don't understand:
- https://github.com/trifectatechfoundation/sudo-rs/issues/1299
- https://github.com/trifectatechfoundation/sudo-rs/issues/567
And the biggest one of all is askpass support, which is 100% required for pyinfra - looks like they realized their mistake due to the number of reports! So support should be landing soon (PR):
- https://github.com/trifectatechfoundation/sudo-rs/issues/1249
Until then - workaround is to switch back to classic sudo, workaround here: https://github.com/trifectatechfoundation/sudo-rs/issues/1299#issuecomment-3567268773