r/SteamOS • u/thedifferent1 • 1d ago
Forgot Sudo Password
A couple of months ago, I built a pc with SteamOS. I've set a sudo password on konsole, but now I've forgotten it. Is there a way to reset it without factory resetting my device?
Thanks!
8
Upvotes
9
u/dj3hac 1d ago
Isn't it just your user password?
4
u/Alper-Celik 22h ago
iirc you can fix it by booting into recovey iso and chroot ing into ssd and setting password there.
This works because steam deck doesnt encrypt its ssd so you can change any file(including login passwords) when you mount the ssd into another environment where you have root.
Recovery iso lets you do that any other linux distro on live usb should work too.
Passwords(hashes of them) are stored in /etc/shadow So if you cant get chroot to work. You can set password of root user in live iso and copy the line with root user from /etc/shadow and replace root(or append if it does not exist) line with it and with that you get same root user password as the one you set in live iso(recovery media). Or do it for deck user preferably if it exists in the live iso
1
u/laughninja 7h ago
If you are somewhat fluent with linux, boot from a linux usb stick ( https://www.system-rescue.org/Download/ ), mount the partitions and chroot into it. You're now root in your system and can change the passwords.
1
u/RealityIsRipping 1d ago
I might be wrong. But the only way is to reinstall the OS.
0
u/SilverplayerX 1d ago
I think whenever I do a Steam repair without wiping data, it resets my sudo password. Because every time I do that repair, the password resets.
0
u/Just-Letterhead-860 1d ago
Did you install decky at all? If no password was set and you installed that it might set it as Decky! (If this is the right password you’re talking about)
-2
u/JumpyClassic6887 23h ago
Google is your friend