[GH-ISSUE #229] Unable to login #79

Closed
opened 2026-02-27 08:15:07 +03:00 by kerem · 15 comments
Owner

Originally created by @Abraka on GitHub (Jul 8, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/229

Iv got lldap_config.toml with user and password parameters...password has 8 charakcters. Still unbale to login. Docker installation.

2022-07-08T20:39:01.189975406+00:00 INFO     i [info]: DB Cleanup stopped
2022-07-08T20:39:01.190066146+00:00 INFO     i [info]: End.
Loading configuration from /data/lldap_config.toml
2022-07-08T20:39:01.570817495+00:00 INFO     set_up_server [ 1.66ms | 100.00% ]
2022-07-08T20:39:01.570842572+00:00 INFO     ┝━ i [info]: Starting LLDAP version 0.4.0
2022-07-08T20:39:01.574520899+00:00 INFO     ┝━ i [info]: Starting the LDAP server on port 3890
2022-07-08T20:39:01.575017039+00:00 INFO     ┕━ i [info]: Starting the API/web server on port 17170
2022-07-08T20:39:01.575160829+00:00 INFO     i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281
2022-07-08T20:39:01.575391321+00:00 INFO     i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-08T20:39:01.575416729+00:00 INFO     i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-08T20:39:01.575523849+00:00 INFO     i [info]: DB Cleanup Cron started
2022-07-08T20:39:20.552753811+00:00 INFO     HTTP request [ 834µs | 100.00% ]
2022-07-08T20:39:20.552765052+00:00 INFO     ┝━ i [info]:  | uri: /auth/opaque/login/start
2022-07-08T20:39:20.553743997+00:00 INFO     ┕━ i [info]:  | status_code: 200
Originally created by @Abraka on GitHub (Jul 8, 2022). Original GitHub issue: https://github.com/lldap/lldap/issues/229 Iv got lldap_config.toml with user and password parameters...password has 8 charakcters. Still unbale to login. Docker installation. ``` 2022-07-08T20:39:01.189975406+00:00 INFO i [info]: DB Cleanup stopped 2022-07-08T20:39:01.190066146+00:00 INFO i [info]: End. Loading configuration from /data/lldap_config.toml 2022-07-08T20:39:01.570817495+00:00 INFO set_up_server [ 1.66ms | 100.00% ] 2022-07-08T20:39:01.570842572+00:00 INFO ┝━ i [info]: Starting LLDAP version 0.4.0 2022-07-08T20:39:01.574520899+00:00 INFO ┝━ i [info]: Starting the LDAP server on port 3890 2022-07-08T20:39:01.575017039+00:00 INFO ┕━ i [info]: Starting the API/web server on port 17170 2022-07-08T20:39:01.575160829+00:00 INFO i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281 2022-07-08T20:39:01.575391321+00:00 INFO i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-08T20:39:01.575416729+00:00 INFO i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-08T20:39:01.575523849+00:00 INFO i [info]: DB Cleanup Cron started 2022-07-08T20:39:20.552753811+00:00 INFO HTTP request [ 834µs | 100.00% ] 2022-07-08T20:39:20.552765052+00:00 INFO ┝━ i [info]: | uri: /auth/opaque/login/start 2022-07-08T20:39:20.553743997+00:00 INFO ┕━ i [info]: | status_code: 200 ```
kerem closed this issue 2026-02-27 08:15:07 +03:00
Author
Owner

@nitnelave commented on GitHub (Jul 8, 2022):

Can you restart the server in verbose mode and paste the logs? How are you trying to log in? Via the web interface or through LDAP ?

<!-- gh-comment-id:1179385637 --> @nitnelave commented on GitHub (Jul 8, 2022): Can you restart the server in verbose mode and paste the logs? How are you trying to log in? Via the web interface or through LDAP ?
Author
Owner

@Abraka commented on GitHub (Jul 8, 2022):

docker run -d --name=lldap -e PUID=1100 -e PGID=1100 -p 3890:3890 -p 17170:17170 -v /home/lldap/lldap_data:/data --restart unless-stopped nitnelave/lldap:stable


ls -lah /home/lldap/lldap_data/

drwxrwxrwx 2 lldap lldap   101  8. čec 23.59 .
drwxrwxrwx 3 lldap lldap    23  8. čec 22.05 ..
-rwxrwxrwx 1 lldap lldap  4,9K  8. čec 23.58 lldap_config.toml
-rwxrwxrwx 1 lldap lldap   128  8. čec 22.37 private_key
-rwxrwxrwx 1 lldap lldap   40K  8. čec 22.59 users.db
-rwxrwxrwx 1  1000 sonarr  32K  9. čec 00.02 users.db-shm
-rwxrwxrwx 1  1000 sonarr    0  8. čec 23.59 users.db-wal

Login via web interface

ldap_user_dn = "admin'                                                           
ldap_user_pass = "Ldap2222"    

Verbose:

2022-07-08T22:02:08.938731626+00:00 INFO     set_up_server [ 1.62ms | 84.36% / 100.00% ]
2022-07-08T22:02:08.938760641+00:00 INFO     ┝━ i [info]: Starting LLDAP version 0.4.0
2022-07-08T22:02:08.942930679+00:00 DEBUG    ┝━ get_user_details [ 92.6µs | 5.73% ]
2022-07-08T22:02:08.942938825+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | user_id: UserId("admin")
2022-07-08T22:02:08.942954915+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | query: SELECT "user_id", "email", "display_name", "first_name", "last_name", "avatar", "creation_date", "uuid" FROM "users" WHERE "user_id" = ?
2022-07-08T22:02:08.943148558+00:00 DEBUG    │  ┕━ 🐛 [debug]:  | return: User { user_id: UserId("admin"), email: "", display_name: "Administrator", first_name: "", last_name: "", creation_date: 2022-07-08T20:37:53.571732188Z, uuid: Uuid("c15bcf24-c8c0-34c1-b76c-f1b457823347") }
2022-07-08T22:02:08.943163997+00:00 DEBUG    ┝━ list_groups [ 105µs | 6.51% ]
2022-07-08T22:02:08.943168706+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | filters: Some(DisplayName("lldap_password_manager"))
2022-07-08T22:02:08.943205154+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | query: SELECT "groups"."group_id", "display_name", "creation_date", "uuid", "user_id" FROM "groups" LEFT JOIN "memberships" ON "groups"."group_id" = "memberships"."group_id" WHERE "groups"."display_name" = ? ORDER BY "display_name" ASC, "user_id" ASC
2022-07-08T22:02:08.943384981+00:00 DEBUG    │  ┕━ 🐛 [debug]:  | return: [Group { id: GroupId(2), display_name: "lldap_password_manager", creation_date: 2022-07-08T20:37:53.720010069Z, uuid: Uuid("5f5802b3-b73b-3d34-9f7f-d33d72d11da9"), users: [] }]
2022-07-08T22:02:08.943576801+00:00 INFO     ┝━ i [info]: Starting the LDAP server on port 3890
2022-07-08T22:02:08.943927468+00:00 DEBUG    ┝━ get_jwt_blacklist [ 55.1µs | 3.41% ]
2022-07-08T22:02:08.943934462+00:00 DEBUG    │  ┕━ 🐛 [debug]:  | query: SELECT "jwt_hash" FROM "jwt_storage"
2022-07-08T22:02:08.944057222+00:00 INFO     ┕━ i [info]: Starting the API/web server on port 17170
2022-07-08T22:02:08.944203746+00:00 INFO     i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281
2022-07-08T22:02:08.944447814+00:00 INFO     i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-08T22:02:08.944474464+00:00 INFO     i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-08T22:02:08.944705567+00:00 INFO     i [info]: DB Cleanup Cron started
2022-07-08T22:02:49.365877734+00:00 INFO     HTTP request [ 161µs | 100.00% ]
2022-07-08T22:02:49.365885028+00:00 INFO     ┝━ i [info]:  | uri: /login
2022-07-08T22:02:49.366055468+00:00 INFO     ┕━ i [info]:  | status_code: 304
2022-07-08T22:02:49.381223738+00:00 INFO     HTTP request [ 10.5µs | 100.00% ]                        
<!-- gh-comment-id:1179397349 --> @Abraka commented on GitHub (Jul 8, 2022): `docker run -d --name=lldap -e PUID=1100 -e PGID=1100 -p 3890:3890 -p 17170:17170 -v /home/lldap/lldap_data:/data --restart unless-stopped nitnelave/lldap:stable` ``` ls -lah /home/lldap/lldap_data/ drwxrwxrwx 2 lldap lldap 101 8. čec 23.59 . drwxrwxrwx 3 lldap lldap 23 8. čec 22.05 .. -rwxrwxrwx 1 lldap lldap 4,9K 8. čec 23.58 lldap_config.toml -rwxrwxrwx 1 lldap lldap 128 8. čec 22.37 private_key -rwxrwxrwx 1 lldap lldap 40K 8. čec 22.59 users.db -rwxrwxrwx 1 1000 sonarr 32K 9. čec 00.02 users.db-shm -rwxrwxrwx 1 1000 sonarr 0 8. čec 23.59 users.db-wal ``` Login via web interface ``` ldap_user_dn = "admin' ldap_user_pass = "Ldap2222" ``` Verbose: ``` 2022-07-08T22:02:08.938731626+00:00 INFO set_up_server [ 1.62ms | 84.36% / 100.00% ] 2022-07-08T22:02:08.938760641+00:00 INFO ┝━ i [info]: Starting LLDAP version 0.4.0 2022-07-08T22:02:08.942930679+00:00 DEBUG ┝━ get_user_details [ 92.6µs | 5.73% ] 2022-07-08T22:02:08.942938825+00:00 DEBUG │ ┝━ 🐛 [debug]: | user_id: UserId("admin") 2022-07-08T22:02:08.942954915+00:00 DEBUG │ ┝━ 🐛 [debug]: | query: SELECT "user_id", "email", "display_name", "first_name", "last_name", "avatar", "creation_date", "uuid" FROM "users" WHERE "user_id" = ? 2022-07-08T22:02:08.943148558+00:00 DEBUG │ ┕━ 🐛 [debug]: | return: User { user_id: UserId("admin"), email: "", display_name: "Administrator", first_name: "", last_name: "", creation_date: 2022-07-08T20:37:53.571732188Z, uuid: Uuid("c15bcf24-c8c0-34c1-b76c-f1b457823347") } 2022-07-08T22:02:08.943163997+00:00 DEBUG ┝━ list_groups [ 105µs | 6.51% ] 2022-07-08T22:02:08.943168706+00:00 DEBUG │ ┝━ 🐛 [debug]: | filters: Some(DisplayName("lldap_password_manager")) 2022-07-08T22:02:08.943205154+00:00 DEBUG │ ┝━ 🐛 [debug]: | query: SELECT "groups"."group_id", "display_name", "creation_date", "uuid", "user_id" FROM "groups" LEFT JOIN "memberships" ON "groups"."group_id" = "memberships"."group_id" WHERE "groups"."display_name" = ? ORDER BY "display_name" ASC, "user_id" ASC 2022-07-08T22:02:08.943384981+00:00 DEBUG │ ┕━ 🐛 [debug]: | return: [Group { id: GroupId(2), display_name: "lldap_password_manager", creation_date: 2022-07-08T20:37:53.720010069Z, uuid: Uuid("5f5802b3-b73b-3d34-9f7f-d33d72d11da9"), users: [] }] 2022-07-08T22:02:08.943576801+00:00 INFO ┝━ i [info]: Starting the LDAP server on port 3890 2022-07-08T22:02:08.943927468+00:00 DEBUG ┝━ get_jwt_blacklist [ 55.1µs | 3.41% ] 2022-07-08T22:02:08.943934462+00:00 DEBUG │ ┕━ 🐛 [debug]: | query: SELECT "jwt_hash" FROM "jwt_storage" 2022-07-08T22:02:08.944057222+00:00 INFO ┕━ i [info]: Starting the API/web server on port 17170 2022-07-08T22:02:08.944203746+00:00 INFO i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281 2022-07-08T22:02:08.944447814+00:00 INFO i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-08T22:02:08.944474464+00:00 INFO i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-08T22:02:08.944705567+00:00 INFO i [info]: DB Cleanup Cron started 2022-07-08T22:02:49.365877734+00:00 INFO HTTP request [ 161µs | 100.00% ] 2022-07-08T22:02:49.365885028+00:00 INFO ┝━ i [info]: | uri: /login 2022-07-08T22:02:49.366055468+00:00 INFO ┕━ i [info]: | status_code: 304 2022-07-08T22:02:49.381223738+00:00 INFO HTTP request [ 10.5µs | 100.00% ] ```
Author
Owner

@martadinata666 commented on GitHub (Jul 9, 2022):

If you use lldap_config.toml kindly attach it. im thinking you are missing JWT part. As your startup command missing some bits that needed docker run -d --name=lldap -e PUID=1100 -e PGID=1100 -p 3890:3890 -p 17170:17170 -v /home/lldap/lldap_data:/data --restart unless-stopped nitnelave/lldap:stable also there is no PUID PGID.

<!-- gh-comment-id:1179469465 --> @martadinata666 commented on GitHub (Jul 9, 2022): If you use `lldap_config.toml` kindly attach it. im thinking you are missing JWT part. As your startup command missing some bits that needed `docker run -d --name=lldap -e PUID=1100 -e PGID=1100 -p 3890:3890 -p 17170:17170 -v /home/lldap/lldap_data:/data --restart unless-stopped nitnelave/lldap:stable` also there is no PUID PGID.
Author
Owner

@Abraka commented on GitHub (Jul 9, 2022):

lldap_config.txt

<!-- gh-comment-id:1179491919 --> @Abraka commented on GitHub (Jul 9, 2022): [lldap_config.txt](https://github.com/nitnelave/lldap/files/9076020/lldap_config.txt)
Author
Owner

@martadinata666 commented on GitHub (Jul 9, 2022):

Tried your lldap_config.toml from clean data directory it works.
my compose

version: "3.8"
services:
  app:
    image: nitnelave/lldap:stable
    restart: unless-stopped
    ports:
      # For LDAP
      - "3890:3890"
      # For the web front-end
      - "17170:17170"
    volumes:
      - ./data:/data

<!-- gh-comment-id:1179500674 --> @martadinata666 commented on GitHub (Jul 9, 2022): Tried your `lldap_config.toml` from clean `data` directory it works. my compose ``` version: "3.8" services: app: image: nitnelave/lldap:stable restart: unless-stopped ports: # For LDAP - "3890:3890" # For the web front-end - "17170:17170" volumes: - ./data:/data ```
Author
Owner

@nitnelave commented on GitHub (Jul 9, 2022):

Did you change the admin's password in the UI? It might not match the config anymore.

<!-- gh-comment-id:1179501275 --> @nitnelave commented on GitHub (Jul 9, 2022): Did you change the admin's password in the UI? It might not match the config anymore.
Author
Owner

@nitnelave commented on GitHub (Jul 9, 2022):

The verbose logs you provided don't show the login attempt. Could you start the server, attempt to login once, and then copy the logs? ideally starting from Starting "lldap" service.

And don't forget to put the logs in a code block when you paste it, surrounded by ```

<!-- gh-comment-id:1179502139 --> @nitnelave commented on GitHub (Jul 9, 2022): The verbose logs you provided don't show the login attempt. Could you start the server, attempt to login once, and then copy the logs? ideally starting from `Starting "lldap" service`. And don't forget to put the logs in a code block when you paste it, surrounded by ```
Author
Owner

@Abraka commented on GitHub (Jul 9, 2022):

Did you change the admin's password in the UI? It might not match the config anymore.

No, I open page for login and type admin and Ldap222 ...which give me a "Invalid username or password"

<!-- gh-comment-id:1179508607 --> @Abraka commented on GitHub (Jul 9, 2022): > Did you change the admin's password in the UI? It might not match the config anymore. No, I open page for login and type admin and Ldap222 ...which give me a "Invalid username or password"
Author
Owner

@Abraka commented on GitHub (Jul 9, 2022):

[entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount
  a volume or folder to /data to persist data across restarts, and that the current user can
  write to it.
[entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount
  a volume or folder to /data to persist data across restarts, and that the current user can
  write to it.
[entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount
  a volume or folder to /data to persist data across restarts, and that the current user can
  write to it.
[entrypoint] Copying the default config to /data/lldap_config.toml
[entrypoint] Edit this file to configure LLDAP.
Loading configuration from /data/lldap_config.toml
WARNING: Default JWT secret used! This is highly unsafe and can allow attackers to log in as admin.
WARNING: Unsecure default admin password is used.
2022-07-09T09:08:32.606627736+00:00 INFO     set_up_server [ 91.1ms | 100.00% ]
2022-07-09T09:08:32.606655358+00:00 INFO     ┝━ i [info]: Starting LLDAP version 0.4.0
2022-07-09T09:08:32.614796974+00:00 ERROR    ┝━ 🚨 [error]:  | error: Database error: `no rows returned by a query that expected to return at least one row`
2022-07-09T09:08:32.614801132+00:00 WARN     ┝━ 🚧 [warn]: Could not get admin user, trying to create it: Database error: `no rows returned by a query that expected to return at least one row`
2022-07-09T09:08:32.711982987+00:00 WARN     ┝━ 🚧 [warn]: Could not find password_manager group, trying to create it
2022-07-09T09:08:32.718308317+00:00 INFO     ┝━ i [info]: Starting the LDAP server on port 3890
2022-07-09T09:08:32.724888345+00:00 INFO     ┕━ i [info]: Starting the API/web server on port 17170
2022-07-09T09:08:32.725034669+00:00 INFO     i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281
2022-07-09T09:08:32.725259381+00:00 INFO     i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-09T09:08:32.725281272+00:00 INFO     i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-09T09:08:32.725783904+00:00 INFO     i [info]: DB Cleanup Cron started

--------------------------------------------------------------------------------------
After modified config:

Loading configuration from /data/lldap_config.toml
Configuration: Configuration {
    ldap_port: 3890,
    http_port: 17170,
    jwt_secret: ***SECRET***,
    ldap_base_dn: "dc=example,dc=com",
    ldap_user_dn: UserId(
        "admin",
    ),
    ldap_user_pass: ***SECRET***,
    database_url: "sqlite:///data/users.db?mode=rwc",
    ignored_user_attributes: [],
    ignored_group_attributes: [],
    verbose: true,
    key_file: "/data/private_key",
    smtp_options: MailOptions {
        enable_password_reset: false,
        from: None,
        reply_to: None,
        server: "localhost",
        port: 587,
        user: "admin",
        password: ***SECRET***,
        tls_required: true,
    },
    ldaps_options: LdapsOptions {
        enabled: false,
        port: 6360,
        cert_file: "cert.pem",
        key_file: "key.pem",
    },
    http_url: "http://localhost",
    server_setup: None,
}
WARNING: Default JWT secret used! This is highly unsafe and can allow attackers to log in as admin.
2022-07-09T09:20:19.211761846+00:00 INFO     set_up_server [ 1.70ms | 84.76% / 100.00% ]
2022-07-09T09:20:19.211790259+00:00 INFO     ┝━ i [info]: Starting LLDAP version 0.4.0
2022-07-09T09:20:19.214690277+00:00 DEBUG    ┝━ get_user_details [ 88.4µs | 5.20% ]
2022-07-09T09:20:19.214697270+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | user_id: UserId("admin")
2022-07-09T09:20:19.214712990+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | query: SELECT "user_id", "email", "display_name", "first_name", "last_name", "avatar", "creation_date", "uuid" FROM "users" WHERE "user_id" = ?
2022-07-09T09:20:19.214880213+00:00 DEBUG    │  ┕━ 🐛 [debug]:  | return: User { user_id: UserId("admin"), email: "", display_name: "Administrator", first_name: "", last_name: "", creation_date: 2022-07-09T09:08:32.614805760Z, uuid: Uuid("df76af8b-8363-3db3-9de5-0b0bb94f7e6a") }
2022-07-09T09:20:19.214892867+00:00 DEBUG    ┝━ list_groups [ 110µs | 6.48% ]
2022-07-09T09:20:19.214897415+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | filters: Some(DisplayName("lldap_password_manager"))
2022-07-09T09:20:19.214934034+00:00 DEBUG    │  ┝━ 🐛 [debug]:  | query: SELECT "groups"."group_id", "display_name", "creation_date", "uuid", "user_id" FROM "groups" LEFT JOIN "memberships" ON "groups"."group_id" = "memberships"."group_id" WHERE "groups"."display_name" = ? ORDER BY "display_name" ASC, "user_id" ASC
2022-07-09T09:20:19.215145701+00:00 DEBUG    │  ┕━ 🐛 [debug]:  | return: [Group { id: GroupId(2), display_name: "lldap_password_manager", creation_date: 2022-07-09T09:08:32.711984641Z, uuid: Uuid("8d9cf256-81ff-3166-972b-d46779ce8fa1"), users: [] }]
2022-07-09T09:20:19.215350775+00:00 INFO     ┝━ i [info]: Starting the LDAP server on port 3890
2022-07-09T09:20:19.215808774+00:00 DEBUG    ┝━ get_jwt_blacklist [ 60.7µs | 3.57% ]
2022-07-09T09:20:19.215819645+00:00 DEBUG    │  ┕━ 🐛 [debug]:  | query: SELECT "jwt_hash" FROM "jwt_storage"
2022-07-09T09:20:19.215946903+00:00 INFO     ┕━ i [info]: Starting the API/web server on port 17170
2022-07-09T09:20:19.216111762+00:00 INFO     i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281
2022-07-09T09:20:19.216309423+00:00 INFO     i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-09T09:20:19.216327667+00:00 INFO     i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296
2022-07-09T09:20:19.216445508+00:00 INFO     i [info]: DB Cleanup Cron started
2022-07-09T09:20:45.104413161+00:00 INFO     HTTP request [ 731µs | 11.16% / 100.00% ]
2022-07-09T09:20:45.104422588+00:00 INFO     ┝━ i [info]:  | uri: /auth/opaque/login/start
2022-07-09T09:20:45.104502027+00:00 DEBUG    ┝━ opaque_login_start [ 649µs | 1.04% / 88.84% ]
2022-07-09T09:20:45.104505794+00:00 DEBUG    │  ┕━ login_start [ 642µs | 77.77% / 87.79% ]
2022-07-09T09:20:45.104508610+00:00 DEBUG    │     ┕━ get_password_file_for_user [ 73.3µs | 10.03% ]
2022-07-09T09:20:45.105272722+00:00 INFO     ┕━ i [info]:  | status_code: 200
<!-- gh-comment-id:1179512228 --> @Abraka commented on GitHub (Jul 9, 2022): ``` write to it. [entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount a volume or folder to /data to persist data across restarts, and that the current user can write to it. [entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount a volume or folder to /data to persist data across restarts, and that the current user can write to it. [entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount a volume or folder to /data to persist data across restarts, and that the current user can write to it. [entrypoint] Copying the default config to /data/lldap_config.toml [entrypoint] Edit this file to configure LLDAP. Loading configuration from /data/lldap_config.toml WARNING: Default JWT secret used! This is highly unsafe and can allow attackers to log in as admin. WARNING: Unsecure default admin password is used. 2022-07-09T09:08:32.606627736+00:00 INFO set_up_server [ 91.1ms | 100.00% ] 2022-07-09T09:08:32.606655358+00:00 INFO ┝━ i [info]: Starting LLDAP version 0.4.0 2022-07-09T09:08:32.614796974+00:00 ERROR ┝━ 🚨 [error]: | error: Database error: `no rows returned by a query that expected to return at least one row` 2022-07-09T09:08:32.614801132+00:00 WARN ┝━ 🚧 [warn]: Could not get admin user, trying to create it: Database error: `no rows returned by a query that expected to return at least one row` 2022-07-09T09:08:32.711982987+00:00 WARN ┝━ 🚧 [warn]: Could not find password_manager group, trying to create it 2022-07-09T09:08:32.718308317+00:00 INFO ┝━ i [info]: Starting the LDAP server on port 3890 2022-07-09T09:08:32.724888345+00:00 INFO ┕━ i [info]: Starting the API/web server on port 17170 2022-07-09T09:08:32.725034669+00:00 INFO i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281 2022-07-09T09:08:32.725259381+00:00 INFO i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-09T09:08:32.725281272+00:00 INFO i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-09T09:08:32.725783904+00:00 INFO i [info]: DB Cleanup Cron started -------------------------------------------------------------------------------------- After modified config: Loading configuration from /data/lldap_config.toml Configuration: Configuration { ldap_port: 3890, http_port: 17170, jwt_secret: ***SECRET***, ldap_base_dn: "dc=example,dc=com", ldap_user_dn: UserId( "admin", ), ldap_user_pass: ***SECRET***, database_url: "sqlite:///data/users.db?mode=rwc", ignored_user_attributes: [], ignored_group_attributes: [], verbose: true, key_file: "/data/private_key", smtp_options: MailOptions { enable_password_reset: false, from: None, reply_to: None, server: "localhost", port: 587, user: "admin", password: ***SECRET***, tls_required: true, }, ldaps_options: LdapsOptions { enabled: false, port: 6360, cert_file: "cert.pem", key_file: "key.pem", }, http_url: "http://localhost", server_setup: None, } WARNING: Default JWT secret used! This is highly unsafe and can allow attackers to log in as admin. 2022-07-09T09:20:19.211761846+00:00 INFO set_up_server [ 1.70ms | 84.76% / 100.00% ] 2022-07-09T09:20:19.211790259+00:00 INFO ┝━ i [info]: Starting LLDAP version 0.4.0 2022-07-09T09:20:19.214690277+00:00 DEBUG ┝━ get_user_details [ 88.4µs | 5.20% ] 2022-07-09T09:20:19.214697270+00:00 DEBUG │ ┝━ 🐛 [debug]: | user_id: UserId("admin") 2022-07-09T09:20:19.214712990+00:00 DEBUG │ ┝━ 🐛 [debug]: | query: SELECT "user_id", "email", "display_name", "first_name", "last_name", "avatar", "creation_date", "uuid" FROM "users" WHERE "user_id" = ? 2022-07-09T09:20:19.214880213+00:00 DEBUG │ ┕━ 🐛 [debug]: | return: User { user_id: UserId("admin"), email: "", display_name: "Administrator", first_name: "", last_name: "", creation_date: 2022-07-09T09:08:32.614805760Z, uuid: Uuid("df76af8b-8363-3db3-9de5-0b0bb94f7e6a") } 2022-07-09T09:20:19.214892867+00:00 DEBUG ┝━ list_groups [ 110µs | 6.48% ] 2022-07-09T09:20:19.214897415+00:00 DEBUG │ ┝━ 🐛 [debug]: | filters: Some(DisplayName("lldap_password_manager")) 2022-07-09T09:20:19.214934034+00:00 DEBUG │ ┝━ 🐛 [debug]: | query: SELECT "groups"."group_id", "display_name", "creation_date", "uuid", "user_id" FROM "groups" LEFT JOIN "memberships" ON "groups"."group_id" = "memberships"."group_id" WHERE "groups"."display_name" = ? ORDER BY "display_name" ASC, "user_id" ASC 2022-07-09T09:20:19.215145701+00:00 DEBUG │ ┕━ 🐛 [debug]: | return: [Group { id: GroupId(2), display_name: "lldap_password_manager", creation_date: 2022-07-09T09:08:32.711984641Z, uuid: Uuid("8d9cf256-81ff-3166-972b-d46779ce8fa1"), users: [] }] 2022-07-09T09:20:19.215350775+00:00 INFO ┝━ i [info]: Starting the LDAP server on port 3890 2022-07-09T09:20:19.215808774+00:00 DEBUG ┝━ get_jwt_blacklist [ 60.7µs | 3.57% ] 2022-07-09T09:20:19.215819645+00:00 DEBUG │ ┕━ 🐛 [debug]: | query: SELECT "jwt_hash" FROM "jwt_storage" 2022-07-09T09:20:19.215946903+00:00 INFO ┕━ i [info]: Starting the API/web server on port 17170 2022-07-09T09:20:19.216111762+00:00 INFO i [info]: Starting 1 workers | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 281 2022-07-09T09:20:19.216309423+00:00 INFO i [info]: Starting "ldap" service on 0.0.0.0:3890 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-09T09:20:19.216327667+00:00 INFO i [info]: Starting "http" service on 0.0.0.0:17170 | log.target: "actix_server::builder" | log.module_path: "actix_server::builder" | log.file: "/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-2.0.0-beta.5/src/builder.rs" | log.line: 296 2022-07-09T09:20:19.216445508+00:00 INFO i [info]: DB Cleanup Cron started 2022-07-09T09:20:45.104413161+00:00 INFO HTTP request [ 731µs | 11.16% / 100.00% ] 2022-07-09T09:20:45.104422588+00:00 INFO ┝━ i [info]: | uri: /auth/opaque/login/start 2022-07-09T09:20:45.104502027+00:00 DEBUG ┝━ opaque_login_start [ 649µs | 1.04% / 88.84% ] 2022-07-09T09:20:45.104505794+00:00 DEBUG │ ┕━ login_start [ 642µs | 77.77% / 87.79% ] 2022-07-09T09:20:45.104508610+00:00 DEBUG │ ┕━ get_password_file_for_user [ 73.3µs | 10.03% ] 2022-07-09T09:20:45.105272722+00:00 INFO ┕━ i [info]: | status_code: 200 ```
Author
Owner

@martadinata666 commented on GitHub (Jul 9, 2022):

Looking from the logs im assuming that

  1. lldap_config.toml not exist at first?
  2. lldap create one then you modified the one generated by lldap?
<!-- gh-comment-id:1179513999 --> @martadinata666 commented on GitHub (Jul 9, 2022): Looking from the logs im assuming that 1. `lldap_config.toml` not exist at first? 2. lldap create one then you modified the one generated by lldap?
Author
Owner

@Abraka commented on GitHub (Jul 9, 2022):

  1. yep, at first start contejner cant write to data, so I give 777 to data folder
  2. restart with modified debug true and password change
<!-- gh-comment-id:1179515547 --> @Abraka commented on GitHub (Jul 9, 2022): 1. yep, at first start contejner cant write to data, so I give 777 to data folder 2. restart with modified debug true and password change
Author
Owner

@martadinata666 commented on GitHub (Jul 9, 2022):

So that is our problem,

  1. Create data folder
  2. Create the lldap_config.toml
  3. Set 777 to the folder
  4. Deploy container.

Tldr: the modified config must exist first

<!-- gh-comment-id:1179516880 --> @martadinata666 commented on GitHub (Jul 9, 2022): So that is our problem, 1. Create data folder 2. Create the lldap_config.toml 3. Set 777 to the folder 4. Deploy container. Tldr: the modified config must exist first
Author
Owner

@Abraka commented on GitHub (Jul 9, 2022):

I kept modified conf and give 777 on all. Deployed new container and now its running and I can login...finally!
Its still creating new files inside data folde with 1000:1000 gid which you put as hardcoded in image.

rwxrwxrwx 2 root  root    101  9. čec 12.34 .
drwxrwxrwx 3 lldap lldap    23  9. čec 11.07 ..
-rwxrwxrwx 1  1000 sonarr 4,9K  9. čec 12.33 lldap_config.toml
-rw-r--r-- 1  1000 sonarr  128  9. čec 12.34 private_key
-rw-r--r-- 1  1000 sonarr 4,0K  9. čec 12.34 users.db
-rw-r--r-- 1  1000 sonarr  32K  9. čec 12.34 users.db-shm
-rw-r--r-- 1  1000 sonarr 101K  9. čec 12.34 users.db-wal
<!-- gh-comment-id:1179521758 --> @Abraka commented on GitHub (Jul 9, 2022): I kept modified conf and give 777 on all. Deployed new container and now its running and I can login...finally! Its still creating new files inside data folde with 1000:1000 gid which you put as hardcoded in image. ``` rwxrwxrwx 2 root root 101 9. čec 12.34 . drwxrwxrwx 3 lldap lldap 23 9. čec 11.07 .. -rwxrwxrwx 1 1000 sonarr 4,9K 9. čec 12.33 lldap_config.toml -rw-r--r-- 1 1000 sonarr 128 9. čec 12.34 private_key -rw-r--r-- 1 1000 sonarr 4,0K 9. čec 12.34 users.db -rw-r--r-- 1 1000 sonarr 32K 9. čec 12.34 users.db-shm -rw-r--r-- 1 1000 sonarr 101K 9. čec 12.34 users.db-wal ```
Author
Owner

@martadinata666 commented on GitHub (Jul 9, 2022):

Yep, right now still hardcoded to user 1000, maybe need some gosu or su-exec to add some UID supports in future.

<!-- gh-comment-id:1179535156 --> @martadinata666 commented on GitHub (Jul 9, 2022): Yep, right now still hardcoded to user 1000, maybe need some gosu or su-exec to add some `UID` supports in future.
Author
Owner

@nitnelave commented on GitHub (Jul 9, 2022):

@martadinata666 can you open an issue to track support for UID/GID?

<!-- gh-comment-id:1179551564 --> @nitnelave commented on GitHub (Jul 9, 2022): @martadinata666 can you open an issue to track support for UID/GID?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#79
No description provided.