Quantcast
Channel: Reset the password in Ubuntu / Linux Bash in Windows - Ask Ubuntu
Viewing all articles
Browse latest Browse all 8

Answer by Richard Szalay for Reset the password in Ubuntu / Linux Bash in Windows

$
0
0

Edit This no longer works if you have a store-installed distribution of WSL.

To add to Tmu's answer, here's a Powershell script (gist) that automates the process (including automatically detecting the current default username)

# Resets the password for the default LXSS / WSL bash user$lxssUsername = (Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss).DefaultUsernamelxrun /setdefaultuser rootbash -c "passwd $lxssUsername"lxrun /setdefaultuser $lxssUsername

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>