-
Notifications
You must be signed in to change notification settings - Fork 817
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 cannot be executed from a windows service using local admin account #9451
Comments
It is working as long as the local user account which is used by the service to authenticated is not part of the group of local admins |
I thought this was the same case as trying to run wsl from task scheduler |
/dupe #9231 |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Found a solution now: In some cases, wsl (LxssManager service may hang while shutting down. Therefore the service Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager] With this setting set, the service can be killed by the following command: taskkill /F /FI "SERVICES eq LxssManager" If you kill it before starting "wsl.exe", everything will be fine |
Thank you very much. This resolved my issue of starting WSL as a Windows service at boot. |
Version
Windows Version: 10.0.19044.2364
WSL Version
Kernel Version
5.15.79.1
Distro Version
Ubuntu 22.04
Other Software
WSL-Version: 1.0.3.0
Kernelversion: 5.15.79.1
WSLg-Version: 1.0.47
MSRDC-Version: 1.2.3575
Direct3D-Version: 1.606.4
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.19044.2364
Repro Steps
Setup a windows service that executes wsl.exe to run linux commands (in our case it a bamboo build agent)
Expected Behavior
WSL version is printed out
Actual Behavior
%ERRORLEVEL% is set to 1 and with the follwing output:
Das System kann auf die Datei nicht zugreifen.
Diagnostic Logs
The behavior exists after wsl was updated to the current release
If I run wsl -l -v with the same user on a windows terminal, I get the following output instead:
WSL-Version: 1.0.3.0
Kernelversion: 5.15.79.1
WSLg-Version: 1.0.47
MSRDC-Version: 1.2.3575
Direct3D-Version: 1.606.4
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.19044.2364
The text was updated successfully, but these errors were encountered: