Seji64 / LAPS-WebUI

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

Cant download/run this container #4

Closed pveiga90 closed 3 years ago

pveiga90 commented 3 years ago

Hey mate, tryin to run your container from docker using the command:

docker run -d \ --name=lapswebui \ -e LDAPServer=ldap.example.com \ -e LDAPPort=389 \ -e LDAPUseSSL=false \ -e LDAPSearchBase=DC=example,DC=com \ -p 8080:8080 \ --restart unless-stopped \ docker.pkg.github.com/seji64/laps-webui/laps-webui

I changes the variables for my environment, but i keep getting access denied, even after login in to docker by running the comand "docker login"...

I also tried pulling the image first, but i always get this error:

"Error response from daemon: unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."

Im kinda new to docker environment, so maybe im doing something wrong?

Seji64 commented 3 years ago

Hi,

no you did nothing wrong.

It looks like you need a registration for the Github Package Registry (see here ). I didn't know that myself - so thanks for the hint :-)

I have now published the image on the Github container repository as well. So you should now be able to use the image via ghcr.io/seji64/laps-webui:latest.

pveiga90 commented 3 years ago

Thanks for the feedback, i now manage to create the container, but being unable to login.

"warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60] Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] No XML encryptor configured. Key {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx} may be persisted to storage in unencrypted form. info: Microsoft.Hosting.Lifetime[0] Now listening on: http://[::]:80 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: /app fail: LAPS_WebUI.Services.LDAPService[0] Unable to load shared library 'ldap-2.4.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libldap-2.4.so.2: cannot open shared object file: No such file or directory But I'm unable to login, this are the logs: "

Seems like its missing some dependencies

I managed to run another version from "https://hub.docker.com/r/seji/laps-webui" successfully, but seems like an outdated version

Seji64 commented 3 years ago

I'm a bit surprised, because we use the same Dockerfile at my work and it works there. I can take a closer look after Easter.

Seji64 commented 3 years ago

Hi, i have looked at the Container we Running at work. The dockerfile is the same. The warnings you mentioned are also printed. They can be igonored. I currently don‘t know why the ldap library is missing here and not at the Image at work.

pveiga90 commented 3 years ago

Just tried downloading the image and recreating the container from scratch, still the same outcome. Is it possible that the shared library is only downloaded when logging in for the first time? i ask becaus i run thi inside a VM with 2 network adapters, one NAT and another bridge, in order to have internet access i need to disable the bridge adapter, which leaves me with only a command line interface. Only after re enabling the bridged adapter i can have access to the container webpage.

Still, it is strange that i can run fine the container published on DockerHub

aoliynik commented 3 years ago

Probably related to this issue: dotnet/runtime#68365

Adding RUN apt-get update \ && apt-get install -y --no-install-recommends \ libldap-2.4-2 \ && rm -rf /var/lib/apt/lists/*

should help to fix ldap.so issue

Seji64 commented 3 years ago

thx @aoliynik !

@pveiga90 could you pull the new image and it try it again?

pveiga90 commented 3 years ago

Hey @Seji64, seems to be working, the error logs are gone :)

I just have 1 small problem where searching one specific machine i get the message "No permission to retrieve LAPS Password", which is incorrect and I can check the password correctly via AD ou the Laps UI application. But this might be a minor bug, since I only got this error on this specific machine, which was the first one i searched for, and I noticed the password was expired... So might be something on my end and futher testing is needed.

One minor repair also, on the README.md, the port should read "-p 8080:80 \" instead of "-p 8080:8080 \", since from my testing this is the port the webpage listens to.

Other than that, it is working great!

Thanks a lot!!!