WSL Ubuntu passwd: Authentication token manipulation error, no input and unable to change password #2559

Closed
opened 2026-01-30 22:58:23 +00:00 by claunia · 11 comments
Owner

Originally created by @atlasicus on GitHub (Jul 4, 2019).

Environment

Microsoft Windows [Version 10.0.18362.207]
WSL Ubuntu

Steps to reproduce

  1. Using Terminal app, open a new Ubuntu tab
  2. Attempt to change the password of an existing user using passwd

Expected behavior

passwd pauses and prompts user input for new password

Actual behavior

Input field is skipped with the error "Authentication token manipulation error" and the password is unable to be changed.

Note: on the same machine, this process works on the standard WSL Bash terminal.

Originally created by @atlasicus on GitHub (Jul 4, 2019). # Environment ``` Microsoft Windows [Version 10.0.18362.207] WSL Ubuntu ``` # Steps to reproduce 1. Using Terminal app, open a new Ubuntu tab 2. Attempt to change the password of an existing user using passwd # Expected behavior passwd pauses and prompts user input for new password # Actual behavior Input field is skipped with the error "Authentication token manipulation error" and the password is unable to be changed. Note: on the same machine, this process works on the standard WSL Bash terminal.
Author
Owner

@zadjii-msft commented on GitHub (Jul 8, 2019):

I don't have the faintest idea why the Terminal might be affecting this. @benhillis do you have any idea what might cause this?

@zadjii-msft commented on GitHub (Jul 8, 2019): I don't have the _faintest_ idea why the Terminal might be affecting this. @benhillis do you have any idea what might cause this?
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 20, 2019):

Yeah, we have no idea what's going on here.

@DHowett-MSFT commented on GitHub (Jul 20, 2019): Yeah, we have no idea what's going on here.
Author
Owner

@GuloGuloDesu commented on GitHub (Sep 9, 2019):

I have been able to reproduce this on Windows 10.0.18362.239 with Debian 1-1-3-0_x64.
I also tried remounting root, to see if that would work, but I still had the same problem (wsl mount -rw -o remount /)

For anyone who needs a work around you can do something like this:

Create a file (Password.sh) with the following:
#!/bin/bash
echo -e "test1\ntest1" | passwd testuser

Then you need to copy the file to WSL, set it to executable, and then run the script:
wsl cp /mnt/c/Users/Administrator/Downloads/Password.sh
wsl chmod +x /Password.sh
wsl /Password.sh

@GuloGuloDesu commented on GitHub (Sep 9, 2019): I have been able to reproduce this on Windows 10.0.18362.239 with Debian 1-1-3-0_x64. I also tried remounting root, to see if that would work, but I still had the same problem (wsl mount -rw -o remount /) For anyone who needs a work around you can do something like this: Create a file (Password.sh) with the following: `#!/bin/bash` `echo -e "test1\ntest1" | passwd testuser` Then you need to copy the file to WSL, set it to executable, and then run the script: `wsl cp /mnt/c/Users/Administrator/Downloads/Password.sh` `wsl chmod +x /Password.sh` `wsl /Password.sh`
Author
Owner

@pellicano commented on GitHub (Mar 11, 2020):

Your command above required me root password (which I did not have).
Just execute on PowerShell wsl -u root passwd testuser and then type your testuser new password.

Reference:
https://docs.microsoft.com/pt-br/windows/wsl/user-support?redirectedfrom=MSDN#reset-your-linux-password

@pellicano commented on GitHub (Mar 11, 2020): Your command above required me root password (which I did not have). Just execute on PowerShell `wsl -u root passwd testuser` and then type your `testuser` new password. Reference: https://docs.microsoft.com/pt-br/windows/wsl/user-support?redirectedfrom=MSDN#reset-your-linux-password
Author
Owner

@kingwill101 commented on GitHub (Jun 16, 2020):

having similar issues, no idea why it started and it seems to appear randomly

@kingwill101 commented on GitHub (Jun 16, 2020): having similar issues, no idea why it started and it seems to appear randomly
Author
Owner

@azdaly commented on GitHub (Jun 28, 2020):

The above answer by pellicano is the correct one!! The docs on how to do this are wrong - they don't have the testuser which is absolutely critical for this working.

@azdaly commented on GitHub (Jun 28, 2020): The above answer by pellicano is the correct one!! The docs on how to do this are wrong - they don't have the `testuser` which is absolutely critical for this working.
Author
Owner

@techiechap commented on GitHub (Jul 22, 2021):

To reset your passed you will have to switch root, which you can do with PowerShell (normal), even if you do switch to root and change your passwd for a normal user, i am sure you can not use sudo, at least i was not able to do so, i had 3 distros on my win 10 with tons of other binaries,
the best way to do it is go to windows registry

KEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss

find your distribution

Check it current value, it must been set to 1000 in decimal or 0x3e8 in hexadecimal
Set "DefaultUid" value to 0 as decimal
Exit registry editor

Start 'Ubuntu terminal ' , it should start with root prompt.
Then run command passwd <normaluser>`
Type new password and retype password`
now the passwd for normal user is changed 
go back  to registry  and set the "DefaultUid" to previous value e.g 1000
Start Ubuntu terminal again and it should login with your existing user without asking for password.
Type $sudo su to get root access.
@techiechap commented on GitHub (Jul 22, 2021): To reset your passed you will have to switch root, which you can do with PowerShell (normal), even if you do switch to root and change your passwd for a normal user, i am sure you can not use sudo, at least i was not able to do so, i had 3 distros on my win 10 with tons of other binaries, the best way to do it is go to windows registry `KEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss` find your distribution ``` Check it current value, it must been set to 1000 in decimal or 0x3e8 in hexadecimal Set "DefaultUid" value to 0 as decimal Exit registry editor Start 'Ubuntu terminal ' , it should start with root prompt. Then run command passwd <normaluser>` Type new password and retype password` now the passwd for normal user is changed go back to registry and set the "DefaultUid" to previous value e.g 1000 Start Ubuntu terminal again and it should login with your existing user without asking for password. Type $sudo su to get root access. ```
Author
Owner

@zljubisic commented on GitHub (Dec 10, 2021):

You can also run cmd.exe and execute wsl -u root.
Than as @techiechap said, then run command passwd normaluser.

@zljubisic commented on GitHub (Dec 10, 2021): You can also run `cmd.exe` and execute `wsl -u root`. Than as @techiechap said, then run command `passwd normaluser`.
Author
Owner

@zadjii-msft commented on GitHub (Jan 24, 2022):

This looks like it's answered, with nothing left for the Terminal/console to fix here. I'm gonna close it out.

@zadjii-msft commented on GitHub (Jan 24, 2022): This looks like it's answered, with nothing left for the Terminal/console to fix here. I'm gonna close it out.
Author
Owner

@averyfreeman commented on GitHub (Sep 3, 2022):

I just wanted to add, I had this same error resulting from passwd in Debian for WSL. sudo would also give 3 failed password attempts immediately and exit without even typing anything in.

Turns out it was a libc version mismatch from my attempt to upgrade from Stretch to Sid. I had left and upgrade unattended and didn't realize the upgrade hadn't completed when I came back (computer had rebooted).

I documented my experience finishing the upgrade here: https://serverfault.com/a/1109856/371042

It was a big jump in dependency versions all at once, so I'm actually kind of surprised it went as easily as it did.

TL;DR, install libc6 ≥ 2.34 and libcrypt ≥ 1:4.4.28 from bookworm deb sources, then:

# apt -o Dpkg::Options::="--force-overwrite" dist-upgrade
@averyfreeman commented on GitHub (Sep 3, 2022): I just wanted to add, I had this same error resulting from `passwd` in Debian for WSL. `sudo` would also give 3 failed password attempts immediately and exit without even typing anything in. Turns out it was a `libc` version mismatch from my attempt to upgrade from Stretch to Sid. I had left and upgrade unattended and didn't realize the upgrade hadn't completed when I came back (computer had rebooted). I documented my experience finishing the upgrade here: https://serverfault.com/a/1109856/371042 It was a big jump in dependency versions all at once, so I'm actually kind of surprised it went as easily as it did. TL;DR, install `libc6 ≥ 2.34` and `libcrypt ≥ 1:4.4.28` from bookworm deb sources, then: ``` # apt -o Dpkg::Options::="--force-overwrite" dist-upgrade ```
Author
Owner

@JonathanEsteves commented on GitHub (Feb 20, 2024):

wsl -u root passwd testuser

Me ajudou muito mesmo, muito obrigado!

@JonathanEsteves commented on GitHub (Feb 20, 2024): > wsl -u root passwd testuser Me ajudou muito mesmo, muito obrigado!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2559