-
-
Save dewdad/a3b891ffa60dc8bd979fdce0d6c29dfb to your computer and use it in GitHub Desktop.
Reset-BashPassword.ps1
This file contains 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