Skip to content

Commit

Permalink
Update WSL.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
kousu authored Mar 21, 2021
1 parent 81e6ed4 commit 01c0c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/WSL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if ($LASTEXITCODE -ne 0) { throw "Could not install distro." }
# https://github.com/microsoft/WSL-DistroLauncher/blob/2ed9a9335fc89a688a5150c95eff4fbdbc830f25/DistroLauncher/DistributionInfo.cpp#L8-L33
wsl -d Ubuntu-18.04 -u root useradd -m "$username"
if ($LASTEXITCODE -ne 0) { throw }
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
if ($LASTEXITCODE -ne 0) { throw }
wsl -d Ubuntu-18.04 -u root chsh -s /bin/bash "$username"
if ($LASTEXITCODE -ne 0) { throw }
Expand Down

0 comments on commit 01c0c96

Please sign in to comment.