WSL - Reset user password

De PedroWiki
Révision datée du 25 novembre 2022 à 08:51 par Jules (discussion | contributions) (Page créée avec « = Introduction = If you loose or forget your basic account in WSL, this article describes how to reset it quickly. = Reset the password = == Turn the defaut user to roo... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

Introduction

If you loose or forget your basic account in WSL, this article describes how to reset it quickly.

Reset the password

Turn the defaut user to root

  • Open a CMD prompt.
  • Call your WSL distribution executable with appropriate parameters:
debian.exe config --default-user root

Launch a new WSL instance and reset the password

  • your new instance should start with user root.
  • type:
passwd <your_username>
  • set the password to a value you will store somewhere.

Set the default user to it's original value

debian.exe config --default-user <your_username>