this post was submitted on 04 Dec 2023
99 points (95.4% liked)

Steam Deck

13929 readers
242 users here now

A place to discuss and support all things Steam Deck.

Replacement for r/steamdeck_linux.

As Lemmy doesn't have flairs yet, you can use these prefixes to indicate what type of post you have made, eg:
[Flair] My post title

The following is a list of suggested flairs:
[Discussion] - General discussion.
[Help] - A request for help or support.
[News] - News about the deck.
[PSA] - Sharing important information.
[Game] - News / info about a game on the deck.
[Update] - An update to a previous post.
[Meta] - Discussion about this community.

Some more Steam Deck specific flairs:
[Boot Screen] - Custom boot screens/videos.
[Selling] - If you are selling your deck.

These are not enforced, but they are encouraged.

Rules:

Link to our Matrix Space

founded 2 years ago
MODERATORS
 

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.

  1. Try out every password variants of mine I can think of for 20 minutes. FAIL.
  2. Google it, stumble on some real stupid "solutions" promoted to the top of the results. FFS Google.
  3. 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 ?
  4. Find an alternative method that looks suuuper risky (tinkers with the recovery partition) [https://www.youtube.com/watch?v=VYBpEysFMDM]. Nope not going to try that one.
  5. Go back to /r/SteamDeck (been a while) again the consensus is to use recovery media. Ok ok, recovery media it is !
  6. Follow instructions at https://help.steampowered.com/en/faqs/view/1B71-EDF2-EB6D-2BB3 and make a bootable USB drive. Easy Peasy.
  7. Muck about for a while with the dock's USB ports because the drive is too large or the ports are too close together. FFS Valve.
  8. Boot successfully on the recovery media, and start the 3 commands-long procedure.
sudo ~/tools/repair_device.sh chroot
rm -f /var/lib/overlays/etc/upper/passwd
rm -f /var/lib/overlays/etc/upper/shadow
  1. First command fails, which is a shame since the others cannot work if this one does not. Fuck.
  2. 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.
  3. Watch the 2 minutes-long video with cautious optimism. Does not seem too hard nor risky... To good to be true
  4. 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).
  5. Fail to return to gaming mode with CTRL-ALT-F1 for some reason, so trigger a command line reboot.
  6. Check that the parameter added to GRUB was not saved (it was not).
  7. Return to desktop mode and finally set a new password with passwd. Exhales. Thanks for the video and instructions 10 Minute Steam Deck Gamer.
top 13 comments
sorted by: hot top controversial new old
[–] BorisBoreUs 22 points 6 months ago

With all of the endless discussion about content on Lemmy, this is a shining example of top tier content. Thank you.

[–] [email protected] 11 points 6 months ago (1 children)

Tl;dw:

Append systemd.debug_shell to the boot command line.

[–] [email protected] 9 points 6 months ago (1 children)

Complete written instructions are in fact in the video description, too. Here they are, for first timers 😉

  1. While the Steam Deck is powered off, hold the 3dots (QAM) and turn on the Steam Deck.
  2. The recovery menu will appear. On your keyboard highlight the 3rd option - CURRENT (OS Boot Menu) then press enter.
  3. The GRUB menu will appear. Highlight the 1st option - SteamOS then on your keyboard press "e" to edit the boot options.
  4. Press down cursor on the keyboard until steamenv_boot is highlighted. Press "end" to go to the end of the line.
  5. Enter the command - systemd.debug_shell
  6. Press CTRL-X to boot!
  7. Once SteamOS loads, press CTL-ALT-F9 on the keyboard to access the root debug shell.
  8. Enter the command - passwd deck
  9. Enter new password and retype the new password.
  10. Once done, press CTL-ALT-F1 on the keyboard to go back to game mode.
[–] [email protected] 5 points 6 months ago

Okay, you got me there. In all fairness, as instruction videos go, that one is on the tame side.

Thanks for posting the instructions here.

[–] [email protected] 11 points 6 months ago (1 children)
  1. Invest in a Password Manager (like BitWarden).

Glad you got things working again!

[–] [email protected] 13 points 6 months ago (1 children)

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 😅 .

[–] [email protected] 7 points 6 months ago (1 children)

I've been using KeePassXC for years and can't live without it... because it has all my passwords.

[–] [email protected] 1 points 6 months ago (1 children)

Me also is using KeePassXC but I wonder how do you guys keep in sync the DB with the steam deck?

[–] [email protected] 2 points 6 months ago

I have my DB synced with my Nextcloud instance. Then I just sync that instance with the Steam Deck.

[–] QuarterSwede 5 points 6 months ago

Thank you for posting this here!

[–] Winged_Hussar 2 points 6 months ago

Thanks for sharing the full journey!

[–] [email protected] 2 points 6 months ago (1 children)

Could you not have just factory reset it? Or was this specifically an attempt to recover the root password without losing your data?

[–] [email protected] 2 points 6 months ago

Yes, it would have worked. It's basically the nuclear option however, so definitely not my first choice. Generally speaking, you can reset credentials of any computer you have physical access to. The question is, how much data do you lose in the process.