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

Need a definitive guide to run the service under Windows 10/11 with a microsoft (online) account #62

Open
bayeslearner opened this issue Oct 23, 2021 · 4 comments

Comments

@bayeslearner
Copy link

bayeslearner commented Oct 23, 2021

Windows generally sucks, but windows computer login or account management now sucks at a different level. Microsoft hired a bunch PHD programmers that are either too smart or too stupid for their own good.

Computer is setup with the microsoft online account, now when I try to run this program as a service, I tried multiple things:

1> username: xxx password: pin ---> no go.

2> username: [email protected] password: microsoft password ---> no go

3> username: MicrosoftAccount\[email protected] password: microsoft password ---> I swear I think it worked before, but it stopped working.

4> username: xxx (the local user under c:\Users\xxx), password: no idea what is the password!
I did check local user policy and xxx is granted run local service rights.
I tried to change the password in computer management, got an error. I was able to change this password without changing to logon as a local user on one PC (forgot how I did it), but not on the other PC.

5> I gave up. Changed to login as a local user and in the process I set the password for the user xxx.

@Paraplegix
Copy link

So i managed to get it working with my microsoft account after fiddling a bit with it

  1. run the wsl2host.exe install command and enter whatever user/password you want, doesn't matter
  2. Open Services window (services.msc)
  3. Go to the WSL2 Host service and right clic > Properties
  4. Under "Connection" tab, clic "browse..." button (Near the username you did put)
  5. On the openned windows just write your full adresse mail of the account you use ("[email protected]")
  6. Click on "verify name" and "ok"
  7. Put you password in the password boxes
  8. Apply, Ok and start the service and see if it works, it did for me first try

Hope this helps

@xewl
Copy link

xewl commented Nov 14, 2021

So i managed to get it working with my microsoft account after fiddling a bit with it

  1. run the wsl2host.exe install command and enter whatever user/password you want, doesn't matter
  2. Open Services window (services.msc)
  3. Go to the WSL2 Host service and right clic > Properties
  4. Under "Connection" tab, clic "browse..." button (Near the username you did put)
  5. On the openned windows just write your full adresse mail of the account you use ("[email protected]")
  6. Click on "verify name" and "ok"
  7. Put you password in the password boxes
  8. Apply, Ok and start the service and see if it works, it did for me first try

Hope this helps

1 - just keep the user & pw empty.

4 - "Log On" tab, select This account, click Browse

Thanks, did the trick.

@pushrbx
Copy link

pushrbx commented Mar 9, 2022

So i managed to get it working with my microsoft account after fiddling a bit with it

1. run the wsl2host.exe install command and enter whatever user/password you want, doesn't matter

2. Open Services window (services.msc)

3. Go to the WSL2 Host service and right clic > Properties

4. Under "Connection" tab, clic "browse..." button (Near the username you did put)

5. On the openned windows just write your full adresse mail of the account you use ("[[email protected]](mailto:[email protected])")

6. Click on "**verify name**" and "ok"

7. Put you password in the password boxes

8. Apply, Ok and start the service and see if it works, it did for me first try

This doesn't work with work accounts, where you are using your work email to login, and your device is managed by your organisation. The workaround in that case given that you have local admin priviledges is the following:

  • Create a new local account with name "wsl2host"
  • Set a password for it
  • Change the wsl2host service to logon with the wsl2host account
  • Start the service, then stop it.
  • (Optional) add your custom aliases in the C:\Users\wsl2host\.wsl2hosts file.
  • (Security risk) Give permission to the wsl2host account to read/write the hosts file in c:\windows\system32\drivers\etc.
  • Start the service again.

I hope the above helps for those who were dumbfounded like me why the thing doesn't work out-of-the-box on my work laptop. 😸

@Maple1401
Copy link

#10 (comment)

try this
试试这个方式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants