Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    You can't reset root on Linux without the ability to go into a boot mode that doesn't exist with WSL. If your user is in the sudo group then you could in theory replace the password hash for root. I assume you have tried wsl --unregister Debian before trying to reinstall Debian?
    – Ramhound
    Commented Apr 6, 2023 at 0:16
  • @Ramhound It's not advisable (see my answer for why), but it is possible to set or reset a root password on WSL with wsl -u root -e passwd. Commented Apr 7, 2023 at 19:22
  • @NotTheDr01ds You need the root password for that to work. I think it's not possible to use admin priv in Windows to change the Debian WSL password: I wish I could force this to be possible. Instead, I am going to start using KeePass and just accept that my memory is twack. Commented Apr 14, 2023 at 3:45