Last active
December 3, 2020 08:38
-
-
Save richardszalay/8e2b9cae0dfe654ed0b8bfcaab361966 to your computer and use it in GitHub Desktop.
Reset-BashPassword.ps1
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, based on https://askubuntu.com/a/808425/697555 | |
$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
getting E r r o r : 0 x 8 0 0 7 0 0 0 2