Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
atlasicus opened this issue Jul 4, 2019 · 11 comments
Labels
Area-Interop Communication between processes Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Question For questions or discussion Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Product-WSL Issue that should probably go to Microsoft/WSL Resolution-Answered Related to questions that have been answered

Comments

@atlasicus
Copy link

atlasicus commented 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.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 4, 2019
@zadjii-msft
Copy link
Member

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 zadjii-msft added the Product-WSL Issue that should probably go to Microsoft/WSL label Jul 8, 2019
@DHowett-MSFT
Copy link
Contributor

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

@miniksa miniksa added Area-Interop Communication between processes Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 1, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 1, 2019
@GuloGuloDesu
Copy link

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

@pellicano
Copy link

pellicano commented 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

@kingwill101
Copy link

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

@azdaly
Copy link

azdaly commented 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.

@techiechap
Copy link

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.

@zljubisic
Copy link

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

@zadjii-msft
Copy link
Member

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

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jan 24, 2022
@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Needs-Tag-Fix Doesn't match tag requirements labels Jan 24, 2022
@averyfreeman
Copy link

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

@JonathanEsteves
Copy link

wsl -u root passwd testuser

Me ajudou muito mesmo, muito obrigado!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interop Communication between processes Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Question For questions or discussion Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Product-WSL Issue that should probably go to Microsoft/WSL Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests