Forgot your sudo password ? Here is a working fix, quick and painless.
TL;DR: watch the 2 minutes video for the fix.
Story time !
It's been a hot minute (~1year) since I needed/wanted to tinker with my Steam Deck. It's currently living its best life paired with the official dock as a desktop PC for my kid (e.g. YouTube and Roblox dedicated machine). So yeah, I went and forgot the sudo password I set back then, and I unhelpfully did not save it in Keepass or anything.
Today I put in the work to reset it... Here goes my journey.
Try out every password variants of mine I can think of for 20 minutes. FAIL.
Google it, stumble on some real stupid "solutions" promoted to the top of the results. FFS Google.
Lots of YT videos seem to agree that recovery media is the way to go. Seems overkill. Cannot we get a root shell at startup or something ?
First command fails, which is a shame since the others cannot work if this one does not. Fuck.
Back to googling and redditing (beggars can't be choosers). Find someone with a very similar error in a quite recent post. No answers though, except one by the OP himself who says he found a way AND DOCUMENTED IT. Thank you /u/TheArtfulAardvark for proper Internet etiquette.Obligatory XKCD curse avoided.
Watch the 2 minutes-long video with cautious optimism. Does not seem too hard nor risky... To good to be true
Perform the procedure, goes more or less exactly as described in the video (not exactly the same version of the boot menu, but same items).
Fail to return to gaming mode with CTRL-ALT-F1 for some reason, so trigger a command line reboot.
Check that the parameter added to GRUB was not saved (it was not).
Return to desktop mode and finally set a new password with passwd. Exhales. Thanks for the video and instructions 10 Minute Steam Deck Gamer.
I've been using Keepass for years for this ! And yet in the fever of tinkering with the hot new toy back then, forgot to save the password. But yes, this time around I did save it 😅 .