While trying to figure out why another user doesn't have sudo privileges I got rid of % in %sudo ALL=(ALL:ALL) ALL and after doing I myself cannot lost sudo access. I get the message "xxxx is not in the sudoers file. This incident will be reported." When I do su, I get "su: Authentication failure" which means (based on googling) the root account is disabled. Any ideas on how to fix this? I also cannot run pkexec visudo as it says "Error executing command as another user: Not authorized". So any suggestions on how to fix this are appreciated. I am using Ubuntu 22.04 Unfortunately none of the solutions listed at How to modify an invalid '/etc/sudoers' file? worked for me
Many thanks