I had an Ubuntu server that started as 24.04, where no user accounts had usable passwords set (access was through SSH keys only), and sudo was made usable by putting the line Defaults !authenticate in a sudoers.d file. After upgrading it to 26.04, the next time I tried to sudo, I got an unknown setting: 'authenticate' error. It looks like the problem is that the upgrade switched me to sudo-rs, which dropped support for that setting and requires the NOPASSWD tag to be added to each entry instead.
Fixing this after the fact is an ordeal that requires a rescue boot or something like that, since you can’t edit that file to fix it without being root, and this problem keeps you from becoming root. Is this something that do-release-upgrade should have checked for, and pause the upgrade or not switch to sudo-rs if it finds? Or is there some other feasible way this can be caught in advance without the user knowing to check for this particular problem?
The sudo-rs tool is now the default sudo provider.
The sudo tool (the original sudo maintained by Todd C. Miller) has been renamed to sudo.ws. Additionally, the sudo-ldap package has been removed: please switch to using LDAP authentication via PAM.
See Ubuntu Server Docs for configuring your default sudo provider and for the differences between sudo-rs and sudo.ws.
Given any error in a /etc/sudoers file is treated as EOF (End of File), I’d have expected that would have caused me to ensure my own changes still work.
As I’m not familiar with the option you used, I’d likely have spun on a VM/install and tried it out, before doing a release-upgrade on a machine I wanted to rely on too.
Run sudo.ws -i from your SSH session to get a root shell without a rescue boot. The original sudo is still installed as sudo.ws on 26.04, and it accepts Defaults !authenticate.
From that root shell, replace the Defaults !authenticate line with a NOPASSWD: tag on each rule, for example:
youruser ALL=(ALL:ALL) NOPASSWD: ALL
Keep the root shell open and test sudo -v from a second SSH session before you close it.
On your other 24.04 servers, make the NOPASSWD: change before running do-release-upgrade. Both sudo and sudo-rs accept that tag, so the server keeps working on either one.