[GH-ISSUE #332] [Bug] Removing admin account #124

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

Originally created by @gelven4sec on GitHub (Oct 13, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/332

Hi,

I got some issues upgrading from the docker image version 0.4.0 to 0.4.1.

I think the problem comes from the startup process looking for the admin account which I deleted because I didn't wanted that username on my admin account. (That actually may not be related to the version)

And there also seems to be a problem with the database.

Here's the log:

> Setup permissions..
> Starting lldap..
Loading configuration from /data/lldap_config.toml
2022-10-13T18:48:25.581767629+00:00 INFO     set_up_server [ 142ms | 100.00% ]
2022-10-13T18:48:25.581789852+00:00 INFO     ┝━ i [info]: Starting LLDAP version 0.4.1
2022-10-13T18:48:25.585642393+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-10-13T18:48:25.761121493+00:00 ERROR    ┕━ 🚨 [error]:  | error: Database error: `error returned from database: UNIQUE constraint failed: groups.display_name`
2022-10-13T18:48:25.761231519+00:00 ERROR    🚨 [error]: Could not bring up the servers: while creating the admin user: Error setting up admin login/account: Error creating admin group: Database error: `error returned from database: UNIQUE constraint failed: groups.display_name`: error returned from database: UNIQUE constraint failed: groups.display_name: UNIQUE constraint failed: groups.display_name
2022-10-13T18:48:25.761294397+00:00 INFO     i [info]: End.

PS: Awesome project !

Originally created by @gelven4sec on GitHub (Oct 13, 2022). Original GitHub issue: https://github.com/lldap/lldap/issues/332 Hi, I got some issues upgrading from the docker image version 0.4.0 to 0.4.1. I think the problem comes from the startup process looking for the `admin` account which I deleted because I didn't wanted that username on my admin account. (That actually may not be related to the version) And there also seems to be a problem with the database. Here's the log: ``` > Setup permissions.. > Starting lldap.. Loading configuration from /data/lldap_config.toml 2022-10-13T18:48:25.581767629+00:00 INFO set_up_server [ 142ms | 100.00% ] 2022-10-13T18:48:25.581789852+00:00 INFO ┝━ i [info]: Starting LLDAP version 0.4.1 2022-10-13T18:48:25.585642393+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-10-13T18:48:25.761121493+00:00 ERROR ┕━ 🚨 [error]: | error: Database error: `error returned from database: UNIQUE constraint failed: groups.display_name` 2022-10-13T18:48:25.761231519+00:00 ERROR 🚨 [error]: Could not bring up the servers: while creating the admin user: Error setting up admin login/account: Error creating admin group: Database error: `error returned from database: UNIQUE constraint failed: groups.display_name`: error returned from database: UNIQUE constraint failed: groups.display_name: UNIQUE constraint failed: groups.display_name 2022-10-13T18:48:25.761294397+00:00 INFO i [info]: End. ``` PS: Awesome project !
kerem closed this issue 2026-02-27 08:15:23 +03:00
Author
Owner

@nitnelave commented on GitHub (Oct 13, 2022):

Did you change the admin username in the config? It'll try to recreate the admin user every time if it doesn't exist, so you have to change the config to match an admin user.

<!-- gh-comment-id:1278151993 --> @nitnelave commented on GitHub (Oct 13, 2022): Did you change the admin username in the config? It'll try to recreate the admin user every time if it doesn't exist, so you have to change the config to match an admin user.
Author
Owner

@gelven4sec commented on GitHub (Oct 13, 2022):

Yes I did. I don't want to keep a user named admin in my setup.

Is there a workaround ?

EDIT: I totally misread your answer, I just changed the admin in the config file and it now works again. I'm closing this. Big thanks.

<!-- gh-comment-id:1278207983 --> @gelven4sec commented on GitHub (Oct 13, 2022): Yes I did. I don't want to keep a user named `admin` in my setup. Is there a workaround ? EDIT: I totally misread your answer, I just changed the admin in the config file and it now works again. I'm closing this. Big thanks.
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#124
No description provided.