How to reset the admin password for Ubuntu on Windows

15,359

This has been answered HERE

Copying from their answer:

  1. In Windows command prompt change the default user to root:

    lxrun /setdefaultuser root

  2. Now Bash on Ubuntu on Windows logs you in as root without asking password

  3. Use passwd command in Bash to change the user password:

    passwd your_username

  4. Change the default user back to your normal user in Windows command prompt

    lxrun /setdefaultuser your_username

Share:
15,359
tom
Author by

tom

Updated on June 14, 2022

Comments

  • tom
    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?