WSL - Reset user password : Différence entre versions

De PedroWiki
(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... »)
 
(Aucune différence)

Version actuelle datée du 25 novembre 2022 à 08:51

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>