Score:-1

How to recover lost 20.04.1.0 administrative password on WSL (Windows Subsystem for Linux)

cn flag

How do I either recover or reset my admin password in a situation where I installed Ubuntu using the Windows Subsystem for Linux? I am running Ubuntu 20.04.1.0.

Gregory Stevens avatar
cn flag
No, because that thread is for Ubuntu 18.04. What's more, the suggestions posted there are inconsistent.
Nmath avatar
ng flag
The answer has not changed since 18.04. There are multiple answers.
NotTheDr01ds avatar
vn flag
[This answer](https://askubuntu.com/a/1171006/1165986) is really the only one that makes sense today. The others are either wrong, out-dated, or even dangerous (as they recommend editing the filesystem in a way that Microsoft says can cause corruption). I'd honestly rather provide a new, correct, up-to-date answer here on this question.
Score:-1
vn flag

Usually there just isn't a root password in WSL, since (a) your normal user has sudo rights and (b) running wsl -u root gets you full root access without a password. There's really not much of a concept of "login", except for a few special situations like SSH.

Is there something you are doing that requires a root password? You should be able to set it with wsl -u root passwd (from PowerShell or cmd), although I'm not at my PC to try it out at the moment.

If you need to reset the password of your primary user, perhaps for sudo access, then wsl -u root passwd username.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.