2

I'm trying to use and install WSL in my Windows environment, but I"m getting errors in changing passwords or logging into the WSL environment.

Look at this

How can I get past this?

Thomas Ward
  • 78,878

1 Answers1

0

From what can be seen in the terminal, you are trying to set a password. By default, WSL has created a root user with username "root" and no password.

You are already logged in as root. Now if you want to change the root password, you need to run passwd and then provide a password when prompted for New password. Then again you have to type that same password when prompted for Retype new password.

Instead, if you want to create a new (non-root) user, you need to run useradd <username>. Then run passwd <username> to set the password for that user. After that, run login and provide the credentials of the newly created user.

Puspam
  • 953