I may have just locked root out of my server, and am looking for help. I have a VPS web server that has been running 10.04 for the past couple of years. For security, I had disabled root login and password authentication. This has been perfect until now, my user has sudo permissions so I've never had difficulty with this arrangement.
I'm doing some work on the box today and a package I need won't run on Lucid, so I upgraded to 12.04. Unfortunately, in the process of upgrading the sudoers file was overwritten (it did ask me first, but I wasn't paying attention and allowed it).
I still have SSH access to the box, but I no longer have sudo permissions. Am I hosed, or is there a way to recover?
su
and login as root.PermitRootLogin without-password
(if I didn't nevertheless usePasswordAuthentication no
...).