Sam Afshari's Notes
  • GitHub
  • Twitter/X
  • All posts
  • Ed
  • NuGets
  • POIWorld
  • RedCorners

Resetting Windows 10 bash user password - Tue, May 29, 2018

If you have forgotten your bash user password on Windows 10, there is a way to log in as root to reset that user’s password using passwd.

First, make sure all bash windows are closed. This is important as if one bash instance is open, this may not work:

Open a Command Prompt as Administrator. You can do that by typing cmd in the Start menu and pressing CTRL+Shift+Enter. Run: ubuntu config --default-user root The previous command tells bash to log in as root the next time it’s started. So you can now run a rooted bash by typing bash. Now you can reset any user’s password by entering passwd myuser Finally, exit bash, and in the elevated Command Prompt, type ubuntu config --default-user myuser to change the default bash login to your bash user.

Back to Home


© Sam Afshari 2024