Skip to content

Instantly share code, notes, and snippets.

@richardszalay
Last active December 3, 2020 08:38
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save richardszalay/8e2b9cae0dfe654ed0b8bfcaab361966 to your computer and use it in GitHub Desktop.
Save richardszalay/8e2b9cae0dfe654ed0b8bfcaab361966 to your computer and use it in GitHub Desktop.
Reset-BashPassword.ps1
# 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
@nitinjs
Copy link

nitinjs commented Mar 5, 2019

getting E r r o r : 0 x 8 0 0 7 0 0 0 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment