Created
June 13, 2017 14:23
-
-
Save hannesbe/e31f6cdcc6a0dfd68cac0266546e036a to your computer and use it in GitHub Desktop.
Resets the password for the default LXSS / WSL bash user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Resets the password for the default LXSS / WSL bash user | |
| $lxssUsername = (Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss).DefaultUsername | |
| lxrun /setdefaultuser root | |
| bash -c "passwd $lxssUsername" | |
| lxrun /setdefaultuser $lxssUsername |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment