Skip to content

Commit da2d6da

Browse files
committed
Update forgotten password based on craigs feedback
1 parent 56bcf44 commit da2d6da

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

WSL/user-support.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,15 @@ You will be asked to enter your current password, then asked to enter your new p
2929

3030
### Forgot your password
3131

32-
If you forgot the password for your Linux distribution, try this:
32+
If you forgot the password for your Linux distribution:
3333

34-
For Ubuntu:
35-
1. Open PowerShell and use it to change the default user name of your Ubuntu distribution to root with: `ubuntu config --default-user root`
34+
1. Open PowerShell and enter the root of your default WSL distribution using the command: `wsl -u root`
3635

37-
2. Open your distribution (Ubuntu) and you should see that the prompt now lists `root@computername` rather than the user name you entered. Enter the command: `passwd <username>` (replacing the username you created for your account and forgot the password for).
36+
-- If you need to update the forgotten password on a distribution that is not your default, use the command: `wsl -d Debian -u root`, replacing `Debian` with the name of your targeted distribution.
3837

39-
3. You will be prompted to enter a new UNIX password and then confirm that password. Once you're told that the password has updated successfully, close the Linux distribution (Ubuntu).
38+
2. Once your WSL distribution has been opened at the root level inside PowerShell, you can use this command to update your password: `passwd`
4039

41-
4. Open PowerShell and use it to change the default user name of your Ubuntu distribution back to your username with: `ubuntu config --default-user <your username>`
42-
43-
5. Now re-open your Ubuntu distribution and you should see your username displayed as the prompt, rather than `root`. Now you can confirm that your password was correctly updated.
44-
45-
For other Linux distributions, follow the same instructions, but in Powershell, change the command to align with the correct distribution name:
46-
47-
- openSUSE Leap 42: `openSUSE-42 config --default-user root`
48-
- SUSE Linux: `SLES-12 config --default-user root`
49-
- Debian: `debian config --default-user root`
50-
- Kali Linux: `kali config --default-user root`
40+
3. You will be prompted to enter a new UNIX password and then confirm that password. Once you're told that the password has updated successfully, close WSL inside of PowerShell using the command: `exit`
5141

5242
> [!NOTE]
5343
> If you are running an early version of Windows operating system, like 1703 (Creators Update) or 1709 (Fall Creators Update), see the [archived version of this user account update doc](../user-support-archived.md).

0 commit comments

Comments
 (0)