We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81e6ed4 commit 01c0c96Copy full SHA for 01c0c96
scripts/WSL.ps1
@@ -23,7 +23,7 @@ if ($LASTEXITCODE -ne 0) { throw "Could not install distro." }
23
# https://github.com/microsoft/WSL-DistroLauncher/blob/2ed9a9335fc89a688a5150c95eff4fbdbc830f25/DistroLauncher/DistributionInfo.cpp#L8-L33
24
wsl -d Ubuntu-18.04 -u root useradd -m "$username"
25
if ($LASTEXITCODE -ne 0) { throw }
26
-wsl -d Ubuntu-18.04 -u root sh -c "echo "${username}:${password}`n" | chpasswd" # wrapped in sh -c to get the pipe to work
+wsl -d Ubuntu-18.04 -u root sh -c 'echo "${username}:${password}" | chpasswd' # wrapped in sh -c to get the pipe to work
27
28
wsl -d Ubuntu-18.04 -u root chsh -s /bin/bash "$username"
29
0 commit comments