Follow-up from “Dumbest Thing you have done distro-hopping?”.
Here’s mine - the laptop from which I’m typing right now has a broken touchpad that keeps jumping and clicking randomly, and does not work. Well, I can’t afford to fix it, but at the moment, I was so pissed off I punched the touchpad really hard, and the machine panicked with all the lights blinking. A few more revival abuses, and the machine was back to life, but since I was running a nixos-rebuild switch --upgrade
in the background, I blew off my boot partition. I think I just broke the unbreakable distro.
Instead of writing a password I was trying to use a Yubikey when I needed to sudo. You are probably seeing where this is going…
I opened an extra terminal and ran sudo su, just to ensure that if anything went wrong I still had a terminal with sudo access. In a new terminal (or so I thought) changed the files I needed and closed the terminal.
Well, the configurations were wrong, I ended up loosing sudo access to the computer and breaking the computer.
So I spend my afternoon formating my computer and laughing about my own stupidity.
In situations like this can’t you get superuser privileges back using grub?
Usually yes, in fact usually you might just do
su
and input your root password (not your user password as you do with sudo) and fix things from there. However it depends on how he was trying to setup the yubikey, I have no experience with those but it’s conceivable that he did something wrong and the key wouldn’t work, but the rest of the system might have been encrypted and required the yubikey (which wasn’t working because of missconfiguration)Unless it’s encrypted with the yubikey in an unrecoverable state, you can simply chroot into the system and reset the password.