Locked root account can not sudo (12.3)

I decided to lock the root account to make it more secure (passwd -l). Earlier before this I had to log into root from the GUI (don’t ask), and afterwards I decided to clean up all the GUI related config files in my root home dir. So I deleted everything in it, including the logon scripts (Wasn’t thinking).
So right now everytime I try to sudo something it says my passwords incorrect (when it is correct) and the root accounts locked.
And when I try to boot into runlevel 1, it just boots normally with a very low resolution, is it because root is locked I wonder???

Anyways can someone help me without having to reinstall?

I think you can fix it by booting from a live CD or similar. Then mount your root file system, and edit “/etc/shadow” (relative to that mounted file system).

Based on the man page, it looks as if locking the account just inserts ‘!’ before the encrypted password field. So delete that one character, save the changed file and reboot into the system. Then test.

Thank you.
I went to vi /etc/shadow and the password field was blank.
So I chrooted into the / and just unlocked the account with passwd -u. :slight_smile: