Skip to content

Instantly share code, notes, and snippets.

@hannesbe
Created June 13, 2017 14:23
Show Gist options
  • Select an option

  • Save hannesbe/e31f6cdcc6a0dfd68cac0266546e036a to your computer and use it in GitHub Desktop.

Select an option

Save hannesbe/e31f6cdcc6a0dfd68cac0266546e036a to your computer and use it in GitHub Desktop.
Resets the password for the default LXSS / WSL bash user
# 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