Skip to content

Instantly share code, notes, and snippets.

@mikerodionov
Created September 15, 2022 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikerodionov/dbdfd2fd2d65816bfda0f881415f17d4 to your computer and use it in GitHub Desktop.
Save mikerodionov/dbdfd2fd2d65816bfda0f881415f17d4 to your computer and use it in GitHub Desktop.
WSL Password Reset
# In elevated CMD switch WSL distro default user to root (adjust distro name as necessary)
ubuntu2204 config --default-user root
# Open WSL session - it will be opened with root user, set password for your user
passwd username
# Switch your default distro user back to your user from elevated cmd window
ubuntu2204 config --default-user username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment