Closed jgoux closed 4 years ago
I have a similar issue and even when creating a new administrator user I still get the following error:
2019/11/22 11:29:14 failed to start wsl2host: could not start service: The service did not start due to a logon failure.
I tried all different combinations, changed password and username. No game.
same issue
I've had similar issues in the past, going to Services App -> Right Click WSL2 Host -> Properties -> Log On Tab -> Browse -> Advanced -> Find Now -> [Select your proper username] -> Ok
Then make sure the selected user has the proper password, stop and restart the WSL2 Host service.
Fixed what issues I was having logging in.
Linked to this thread on Readme
Tried using the fix from @SolomonHD but mine still doesn't start and says logon failure.
@nickescobedo sorry about that. Want to jump on Gitter and try to figure it out?
So we figured something else out. In addition to the username and password if you're still receiving The service did not start due to a logon failure
it could mean that your user is not allowed to logon as a service.
You could have typed your password in correctly but if the security policy isn't set it still won't allow it.
The steps to check are:
Start > Administrative Tools > Local Security Policy > Local Policies > User Rights Assignment > Log on as a service
Make sure the user you set the user/pass for are allowed to log on as a service or it won't allow you.
Hope this helps someone and thank you again Shayne!
Thanks, this solved my problem!
If you are on Windows 10 Home and do not have Local Security Policy under Administrative Tools, you can download and install it using a .bat script provided here: https://www.majorgeeks.com/content/page/how_to_enable_local_security_policy_in_windows_10_home.html
Can't find any "WSL2 service" in the services app (windows 10 version 2004)
Has anyone managed to set this up with microsoft account (not local)?
Has anyone managed to set this up with microsoft account (not local)?
me! windows 10 version 2004
@wujingquan How did you do it? In what form did you enter your credentials?
Managed to start the service with a Microsoft account using the following steps:
services.msc
. Entering the username from C:\Users\<username>
during setup should be sufficient.WinKey+L
, then log in via the Microsoft account password (not via Windows Hello), this should be necessary just once. You might need to go to "Sign-in options" and disable the "Require Windows Hello sign-in for Microsoft accounts" to do so.Thanks @SolomonHD & @nickescobedo - got it working using your instructions and thanks to @shayne for wsl2-host.
I'm running ubuntu2004 and debian - I just have one weird issue: Both instances have the same IP address! At first I thought this issue may have been a problem with wsl2-host when I checked the host file, but when I checked the assigned IP addresses in both the machine, the IPs are the same, even after restarting them.
Managed to start the service with a Microsoft account using the following steps:
- I can't enter my username #10 (comment), i.e. select the proper user in
services.msc
. Entering the username fromC:\Users\<username>
during setup should be sufficient.- I can't enter my username #10 (comment), i.e. add the service logon permission to the user in "Local Security Policy".
- Lock your computer via
WinKey+L
, then log in via the Microsoft account password (not via Windows Hello), this should be necessary just once. You might need to go to "Sign-in options" and disable the "Require Windows Hello sign-in for Microsoft accounts" to do so.
U saved me!!! Step 3 is the key point for me!! Since I've been logging in via Windows Hello, I'm always prompted with a login failure no matter how much I try to start the service until I turn off Windows Hello and log in with my Microsoft account password, and it finally succeeds.
So we figured something else out. In addition to the username and password if you're still receiving
The service did not start due to a logon failure
it could mean that your user is not allowed to logon as a service.You could have typed your password in correctly but if the security policy isn't set it still won't allow it.
The steps to check are:
Start > Administrative Tools > Local Security Policy > Local Policies > User Rights Assignment > Log on as a service
Make sure the user you set the user/pass for are allowed to log on as a service or it won't allow you.
Hope this helps someone and thank you again Shayne!
I don't know if someone already didn't mention this but it would be nice if during the installation process this would be check and the user was asked if the record with his username should be added. I know it is possible to automatize this the question is do you think it makes sense?
Thank you all for the detailed solutions above. Tried them all, none of them worked.
What actually worked for me ended up being far more simpler. Just follow https://github.com/shayne/go-wsl2-host/issues/10#issuecomment-562631992, but use Local System account
instead:
Success:
However while the service is running, the hosts file is not reflecting any new .wsl
hosts :(
After some tinkering with the executable, the hosts file got automagically updated !?!
From command line type C:\Windows\System32\drivers\etc\hosts
:
Thanks, I am using debug param and the host file update.
Hello,
I am trying to install wsl2host but i always get invalid user error .
Windows Password: 2022/06/30 18:07:25 failed to install wsl2host: The account name is invalid or does not exist, or the password is invalid for the account name specified
Can any one help me fix this issue.
I am facing the same issue as @suseetherk here. I have tried all solutions in this thread to no avail.
有可能是账号不对,用 windows 账号登陆时,你的账号名称也许不是 email , 可以在点运行,输入control userpasswords2,看看自己的账号到底是啥。
然后再用这个账户+你的微软账号密码登陆。 就能正常安装了
Maybe the account is wrong. When you log in with a windows account, your account name may not be email. You can run it at the point and enter control userpasswords2 to see what your account is.
Then use this account + your Microsoft account Password to log in. can be installed normally
Hello,
I'm trying to install the service but my username isn't accepted.
I have a microsoft account, and passing my email address gets me a "specified domain doesn't exist".
So I tried to get my local username using "net user" which is "Julien Goux", but as soon as I type it I got the error "invalid username", I can't even type my password.
Maybe it's because I have a space in my username?