Seji64 / LAPS-WebUI

A nice and simple Web Interface for LAPS (Local Administrator Password Solution)
MIT License
29 stars 6 forks source link

python error on Windows Server with LAPS v2 #14

Closed magicvodi closed 1 year ago

magicvodi commented 1 year ago

Hi, we are rolling out LAPSv2 in our environment, so I upgraded LAPS-WebUI. On my Windows bare metal Installation, after installing python and dpapi-ng i get the following error when I try to show a Computer with a LAPS v2 password:

Failed to fetch LAPS data for computer COMPUTERNAME Error: Command execution failed because the underlying process (python.exe#4220) returned a non-zero exit code (120). Command: python "C:\LAPS-WebUI-v1.5.4-win-x64\scripts\DecryptEncryptedLAPSPassword.py" --user DOMAIN\USERNAME --password PASSWORD --data BUNCH_OFF_BASE64_DATA You can suppress this validation by calling WithValidation(CommandResultValidation.None) on the command.

When I run the command python command on the server it runs successfully (exit code 0) and shows me the decrypted password.

Seji64 commented 1 year ago

Which Python version do you have installed?

//Edit

Just tested it (just to be sure) on my dev machine with Windows 11 22H2 and python version 3.11.5 => works perfectly

magicvodi commented 1 year ago

It's python 3.12.0 on Windows Server 2019

IBS-IT commented 1 year ago

I think I have the same problem using the docker container v1.5.2 I suspect that the arguments to the python script need to be in quotes but I can't be sure.

Seji64 commented 1 year ago

I think I have the same problem using the docker container v1.5.2 I suspect that the arguments to the python script need to be in quotes but I can't be sure.

Hm the path is already in quotes...does you password or username has spaces or special characters in it? could be the culprint

It's python 3.12.0 on Windows Server 2019

Installed python 3.12 - work also for me

Seji64 commented 1 year ago

Here a test build with the latest commit - can u test pls?

https://transfer.sh/OTs8LEs0Yn/publish.zip

magicvodi commented 1 year ago

The old build works with a simplified password and the new build works with our usual passwords with spaces and special characters. Many thanks!

Seji64 commented 1 year ago

fixed in v1.5.5