shayne / go-wsl2-host

Automatically update your Windows hosts file with the WSL2 VM IP address
1.65k stars 142 forks source link

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

Open bayeslearner opened 3 years ago

bayeslearner commented 3 years ago

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: yyy@live.com password: microsoft password ---> no go

3> username: MicrosoftAccount\yyy@live.com 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 commented 2 years ago

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 ("something@web.mail")
  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 commented 2 years ago

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 ("something@web.mail")
  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 commented 2 years ago

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 ("[something@web.mail](mailto:something@web.mail)")

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:

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 commented 1 year ago

https://github.com/shayne/go-wsl2-host/issues/10#issuecomment-1301869735

try this 试试这个方式