Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

WSL Reset Password

20190509 It is relatively simple to reset your user password on your Ubuntu system under WSL. This is useful if you have forgotten the password and need to perform some system administration operations on Ubuntu.

To reset your Ubuntu user account password, start up a PowerShell (Super+X, A) and configure Ubuntu to log in by default as the root (admin) user:

> ubuntu1804 config --default-user root

Then start up Ubuntu as normal. Here we simply start it up from the PowerShell command line:

> ubuntu1804

Now change your user (e.g., the user kayon) password:

# passwd kayon
Enter new UNIX password: 
Retype new UNIX password:

Then logout of Ubuntu and reconfigure the default user:

# logout
> ubuntu1804 config --default-user kayon

Figure 4.1: Process for changing user password in Ubuntu under WSL.
Image wsl-change-password

Notice that the command line prompts in the above examples differ depending on which system is interpreting the commands. The greater than prompt > is for the PowerShell whilst the hash prompt # is for the root user on Ubuntu. For a normal user on Ubuntu the prompt is usually a dollar sign $.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © Togaware Pty Ltd. . Creative Commons ShareAlike V4.