Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu 18.04 on WSL2: "Logon failure: the user has not been granted the requested logon type at this computer."

After restarting my Windows machine, I received this error trying to open my Ubuntu 18.04 WSL2 instance.

Logon failure: the user has not been granted the requested logon type at this computer.                                                                                                       
Press any key to continue... 

It had been working totally normally before the restart.

like image 520
teefour Avatar asked Jul 01 '20 16:07

teefour


People also ask

How do I fix resolve logon failure the user has not granted the requested logon type at this computer?

To resolve this issue, edit the Access this computer from the network local policy on the desktop to restore the "Users" access group or add one or more user and group values to provide the required access. Alternatively this can be configured using Group Policy.

What has not been granted the requested logon type at this computer?

To solve “The user has not been granted the requested logon type at this computer” error, you should make sure that the login user and all groups that belong to are allowed to log on locally to this computer.

What is logon failure?

A user sees the error “Logon failure: the user has not been granted the requested logon type at this computer” when attempting to log in through Duo Authentication for Windows Logon (RDP). Alternatively, a user may see the error "To sign in remotely, you need the right to sign in through Remote Desktop Services.

What does login failure mean on WSL2?

- Stack Overflow Ubuntu 18.04 on WSL2: "Logon failure: the user has not been granted the requested logon type at this computer." Bookmark this question. Show activity on this post.

What does “logon failed” mean?

Logon failure: The user has not been granted the requested logon type at this computer. How to solve “The user has not been granted the requested logon type at this computer”?

What does “the user has not been granted the requested logon type?

Great, “ The user has not been granted the requested logon type at this computer ” is gone, you should be able to login to this computer without any issue now. Alternatively, you can also allow the newly created user to logon locally to the windows by doing the following:

Why can't I log into my user account on Ubuntu?

I've had this happen for one user account on Ubuntu and it was caused by something screwy in the user's ~/. config directory. To quickly fix, switch to log in as the user via the console (Ctrl-Alt-F3 or similar) then at the prompt do mv ~/. config ~/config. old. Switch back to the GUI (Ctrl-Alt-F1 or similar) and you should be able to log in.


2 Answers

Restarting the vmcompute service worked for me. From an elevated PowerShell (close WSL2 first though!):

Get-Service vmcompute | Restart-Service

And then run WSL2 again.

like image 93
Baza86 Avatar answered Sep 25 '22 12:09

Baza86


Google returned a lot of complicated solutions for when you're dealing with this on a real server, but for personal WSL2 use, my coworker and I both found that Windows had simply disabled Hyper-V when it restarted.

To turn it back on:

  1. Search for and open "Turn Windows features on or off"
  2. Check the box next to Hyper-V
  3. Restart your system
like image 35
teefour Avatar answered Sep 21 '22 12:09

teefour