How to reset the admin password for Ubuntu on Windows
15,359
This has been answered HERE
Copying from their answer:
-
In Windows command prompt change the default user to root:
lxrun /setdefaultuser root
Now Bash on Ubuntu on Windows logs you in as root without asking password
-
Use passwd command in Bash to change the user password:
passwd your_username
-
Change the default user back to your normal user in Windows command prompt
lxrun /setdefaultuser your_username
Author by
tom
Updated on June 14, 2022Comments
-
tom almost 2 years
I have Bash Ubuntu on Windows 10. This is enabled by turning on the Developer mode feature so the normal non-programmer would likely not need this. I need to reset the password. I must have typed it wrong (twice, somehow) when I first set it up. How can I do that?