mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #48] How do I login? #25
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @benisai on GitHub (Oct 5, 2021).
Original GitHub issue: https://github.com/lldap/lldap/issues/48
I really want to use this, but how do I login to the interface? All I see is username and email
@nitnelave commented on GitHub (Oct 5, 2021):
Hi!
During the initial run, the server creates an admin user using the username and password that you put in the configuration. When logging in as this user, you'll see the list of users on the server, which should be just the admin user. You can then create new users with the "create user" button.
Note that the frontend is not quite finished, you won't be able to create groups right now. If you don't need groups, all the basic functionality should be there.
@benisai commented on GitHub (Oct 6, 2021):
I must have a bad build/image, I used latest tho. all I see is username and email prompt.
@benisai commented on GitHub (Oct 6, 2021):
Please see photo here -> https://ibb.co/tsChqc3
This is all I see. its username and email, which the email would probably be password instead? Maybe the app is having issues?
@nitnelave commented on GitHub (Oct 6, 2021):
Ah, sorry for that. Ignore the "Email" text, it should be password.
@benisai commented on GitHub (Oct 6, 2021):
I can't ignore. It needs the @ symbol otherwise I cannot press login.
@benisai commented on GitHub (Oct 6, 2021):
@nitnelave the email field requires the @ symbol. This is a bug in the code / UI. Can you open a ticket for it?
@nitnelave commented on GitHub (Oct 6, 2021):
Calm down, there's no need to send messages this close together, I'm working on this project in my free time.
I checked the code, and I checked all the history of the specific file, and there is and has never been a requirement for a "@" symbol.
However, there is a requirement for a minimum of 8 characters. Maybe that's what tripped you up?
@nitnelave commented on GitHub (Oct 6, 2021):
Feel free to pull the last docker image, it should have the correct placeholder text (doesn't change the requirements on the field, though).
@benisai commented on GitHub (Oct 6, 2021):
@nitnelave thank you. I will pull it today. My PW is probably not 8 char. Thank you for this project and your time.
@benisai commented on GitHub (Oct 8, 2021):
@nitnelave -- so I set a 8+ char pw length. I tried to login with admin/password123, but it says invalid creds. What am I doing wrong here? :)
Here are my logs > https://pastebin.com/XK2v2bpw
JWT was generated online, its random so I dont care if people see it.
Here is my compose::
`version: "3.5"
services:
lldap:
image: nitnelave/lldap
container_name: lldap
restart: always
hostname: ldap
networks:
- web
ports:
# For LDAP
- "3890:3890"
# For the web front-end
- "17170:17170"
volumes:
- "lldap_data:/data"
environment:
- JWT_SECRET=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTYzMzY2Njg4NywiaWF0IjoxNjMzNjY2ODg3fQ.ScS4>
- LDAP_USER_PASS=password123
- LDAP_BASE_DN=dc=example,dc=com
networks:
web:
external: true
volumes:
lldap_data:
driver: local
`
@nitnelave commented on GitHub (Oct 8, 2021):
Try to delete the users.db: since the admin user already exists, the password is not changed (i think). If you delete the DB, the user will get recreated with the right password.
@benisai commented on GitHub (Oct 9, 2021):
I connected to the container and rm users.db, restarted the container, but still admin/password123 does not work.
I even removed any/all volumes.
Nothing I do will log me in. Just says invalid creds
@benisai commented on GitHub (Oct 9, 2021):
Also, another question. I copied the raw contents of the config file to /data/lldap_config.toml in the container via console, but I get "Error: Could not write the generated server setup to file
/data/private_key"I tried mounting the file via docker-compose, but same error, private key could not write. So what is the best way to get this config file in the container.
volumes: - "/data:/data" - "./config/lldap_config.toml:/data/lldap_config.toml"or does a default config.toml file exist, and I can just use the env variables to override?
I really want to use this, its what I've been looking for.
@nitnelave commented on GitHub (Oct 9, 2021):
Ah, in your last message I see the cause of both of your problems: if the server cannot write the private key file, it cannot generate the admin password (it's not a problem of configuration file).
The error seems to point to a file permission error: are you sure that the user in the container has the rights to create a file in the /data folder? Note that the user inside the container is different from your user. The user inside is "app" with UID 10001. Maybe the mounted volume is read-only? Maybe the file permissions are wrong? For this, I'm not sure I can help much more: it's a generic docker question that Stackoverflow will better answer (or that you can find in their archives). Once you do find the answer, please remember to post the solution here :)
Note that i would delay a bit before using this project as your main source of truth for passwords since I might reduce the security of the login in order to make it faster, which would invalidate all stored passwords. (Or maybe I'll figure out how to compute it in the background and that's enough).
@benisai commented on GitHub (Oct 9, 2021):
Well, Let me ask you, how do you mount the config file? Can you share your method, so I can get this working. 🙂👍🏻
If I don't include the config file in my docker compose mount the container appears to work. But I can't log in.
@nitnelave commented on GitHub (Oct 15, 2021):
I'm not currently running this in prod, I just have my dev setup, so running the service in localhost. But I usually mount a folder on my file system rather than use a docker mount, so it's easier to check the permissions. You can try to get a shell inside your container with
docker execto get the insider's point of view, check if the permissions are correct and the folders in the right place.