Hello, this is a quick update following the announcement of adopting sudo-rs as default in Ubuntu.
Throughout this article, I will use sudo.ws to refer to the OG sudo and sudo-rs to refer to the reimagining and rust implementation by the Trifecta Tech Foundation . I will use sudo to refer to the general concept of sudo.
sudo-rs 0.2.8 is now the default sudo in Ubuntu daily images
. Upstream sudo-rs team did a fantastic job to implement all the necessary features in time for 25.10 Feature Freeze. This release includes support for older Linux kernels < 5.9, sudoedit, support for NOEXEC and AppArmor profile switching, along with various miscellaneous fixes.
On the packaging side,
- sudo-rs successfully passed the main inclusion review.
- sudo-rs 0.2.8-1ubuntu2 is the latest version in the main archive as of today.
- It includes vendored rust dependencies.
- i386 build has been enabled, although it does not have manpages since no one is expected to use it interactively.
- It has been added to platform seeds.
- It is part of the Ubuntu Minimal base system and cannot be removed from the system.
The job is not done,
- Some integration tests have implicit dependency on sudo, there are cases where these test cases fail because they rely on feature from sudo.ws which is either not implemented or behaves differently in sudo-rs. Eg. sudo.ws passport prompt. Please watch out for these and report them here or on matrix
#devel:ubuntu.com. - There will be another release with bug fixes and some post 0.2.8 patches from upstream. Example remove documentation for the ignored ‘-I’, ‘-q’, ‘-s’ flags
- We need to plan for 26.10 when sudo-rs is the only sudo provider in the
mainarchive. To achieve this, sudo-rs will need to ship/etc/sudoersconfig and not depend upon sudo.ws to provide one (lp-report). sudo-rs will also need to declare Conflict on sudo.ws to ensure that there is only one Provider of sudo on the system.
Once again, sudo-rs is not a perfect in-place replacement for sudo.ws. If you’d like to look at the differences, I suggest the following links.
Additionally, I/O logging and sudoreplay is not supported. There is no sudoers.ldap, LDAP authentication via PAM should work. As a consequence, we have also removed the sudo.ws sudo-ldap package from Questing. Some of these features are also being removed from Debian. Please look at the CLI flags parity with sudo.ws, although the definitive list is always available via sudo-rs --help. Running man sudoers will also show the configuration options supported by sudo-rs.
sudo-rs package also includes su-rs, a reimplementation of su from util-linux. Users of Ubuntu should continue to use /usr/bin/su, but are also encouraged to experiment with su-rs. The possibility of replacing su with su-rs will be evaluated in a future development cycle
When things go wrong
In case something goes wrong and the /usr/bin/sudo symlink is not available, you should be able to use /usr/bin/sudo-rs (full path: /usr/lib/cargo/bin/sudo). sudo.ws, along with its related binaries is available as well - /usr/bin/sudo.ws, /usr/sbin/visudo.ws, /usr/bin/sudoreplay.ws.
If you’d like to switch to the previous sudo (sudo.ws) and not use sudo-rs, you can use the alternatives mechanism to switch.
This is not recommended, but if you really need to, here are the steps:
Interactive
# update-alternatives --config sudo
Non-interactive
# update-alternatives --set sudo /usr/bin/sudo.ws
You can always switch back to sudo-rs using
# update-alternatives --set sudo /usr/lib/cargo/bin/sudo
Please test the daily image or wait for the next snapshot.
PS: If you miss sudo.ws insults, try this project.