https://github.com/lldap/lldap logo
Struggling with bootstrap.sh (Podman/Quadlets)
# troubleshooting
s
I am well aware of https://discord.com/channels/898492935446876200/1425064722746839060. I wasn't able to follow the fix. My setup: - Rocky Linux 9/Podman 5.8.2/Cockpit/Cockpit-Podman - Caddy - LLDAP+PostgreSQL - LDAP Port forward 389->38900->3890 (Target: QNAP NAS, already connected) I keep getting stuck on bootstrap.sh: "parse error: Invalid numeric literal at line 1, column 16". I ran a modified version of bootstrap.sh and deduced that a login failure was producing the error (quotes are mine, \` marks are included) "`Authentication error for user "customadmin"`" where another command expected JSON. The 16th character is a space. My password in Podman Secret
lldap-ldap-user-pass
is 128 characters of mixed-case alphanumeric with mixed symbols, but a password of "changeme" also seems to throw the same error. I have JSON files for two users and four groups in
/bootstrap/user-configs
and
/bootstrap/group-configs
, respectively. (Both passwords here are set to "changeme".)
/data
used to generate with
lldap_config.toml
and another file when I wiped
/data
(
users.yaml
, I think), but the second one doesn't seem to appear anymore when I reset.
a
message has been deleted
s
Copy code
$ cat lldap.container lldap-postgresql.container
#lldap.container
[Unit]
Description=LLDAP network login container
Requires=lldap-postgresql.service

[Container]
ContainerName=LLDAP
Image=docker.io/lldap/lldap:stable-debian
#Environment=KRB5_REALM=<PRIVATE>.LAN
#Environment=KRB5_KDC=localhost

Environment=UID=1000
Environment=GID=1000
Environment=LLDAP_LDAP_BASE_DN=dc=<private>,dc=lan
Environment=LLDAP_DATABASE_URL=postgres://lldapuser:lldappass@lldap-postgresql/lldap
#My AI agent suggested adding ?sslmode=disable
Environment=LLDAP_LDAP_USER_EMAIL=customadmin@<private>.lan #Doesn't exist

#Bootstrapping.
Secret=lldap-ldap-user-pass,type=env,target=LLDAP_ADMIN_PASSWORD
Environment=LLDAP_URL=http://localhost:17170
Environment=LLDAP_ADMIN_USERNAME=CustomAdmin
#Environment=LLDAP_ADMIN_PASSWORD=changeme

#LDAP traffic from Caddy
PublishPort=38900:3890

Secret=lldap-jwt-secret,type=env,target=LLDAP_JWT_SECRET
Secret=lldap-key-seed,type=env,target=LLDAP_KEY_SEED
Secret=lldap-ldap-user-pass,type=env,target=LLDAP_LDAP_USER_PASS

#Secret=kerberos-password,type=env,target=KRB5_PASS

AutoUpdate=registry
Network=homelab-services.network
Network=lldap.network
Volume=lldap-data:/data
Volume=/home/podmanuser/Network/lldap/bootstrap:/bootstrap:ro,Z 

[Service]
Restart=on-failure

[Install]
# Start by default on boot
WantedBy=default.target
#lldap-postgresql.container #<---START OF 2ND FILE
[Unit]
Description=LLDAP PostgreSQL container
Requires=lldap-postgresql-volume.service
#After=local-fs.target

[Container]
ContainerName=lldap-postgresql
Image=docker.io/library/postgres:latest
#Environment=KRB5_REALM=<PRIVATE>.LAN
#Environment=KRB5_KDC=localhost

Environment=POSTGRES_DB=lldap
Environment=POSTGRES_PASSWORD=lldappass
Environment=POSTGRES_USER=lldapuser

AutoUpdate=registry
#Volume=krb5kdc-data:/var/lib/krb5kdc
Volume=lldap-postgresql.volume:/var/lib/postgresql:Z 
Network=lldap.network

[Service]
Restart=on-failure

[Install]
# Start by default on boot
WantedBy=default.target
For this post, I've made a new secret containing the string "changeme" and pointed both
LLDAP_ADMIN_PASSWORD
and
LLDAP_LDAP_USER_PASS
at it:
Copy code
Secret=lldap-ldap-user-pass-changeme,type=env,target=LLDAP_ADMIN_PASSWORD
Secret=lldap-ldap-user-pass-changeme,type=env,target=LLDAP_LDAP_USER_PASS
From what I understand of the other Podman troubleshooting thread, this should address a problem, but it doesn't address my problem; I'm getting the same error:
Copy code
sh
root@48257bb1a5a6:/app# /bootstrap/bootstrap.sh 
main()
check_install_dependencies()
check_required_env_vars()
check_configs_validity()
auth()
response=...

--Input Variables:
----url=http://localhost:17170
----admin_username=CustomAdmin
----admin_password=changeme

--Output Variable
----response=`Authentication error for user "customadmin"`

TOKEN=...
parse error: Invalid numeric literal at line 1, column 16
The line:
Copy code
response="$(curl --silent --request POST \
    --url "$url/auth/simple/login" \
    --header 'Content-Type: application/json' \
    --data "$(jo -- username="$admin_username" password="$admin_password")")"
is failing to log in, despite having a "normal" username/password.
Maybe I should try all lower case...
No significant forward progress today. - I've double-checked the steps pertinent to Quadlets. The only one I'm hazy on is
Prepare your bootstrapping config as for the docker-compose case in ~/containers/lldap.
- bootstrap.sh is confirmed loading .JSON files - Bootstrap environment variables/secrets are being loaded by bootstrap.sh - Login credentials always break, crashing the script when going for a token.
I've been working with a local AI agent (Hermes Agent/Gemma 4 26B). By feeding him the source code and startup logs, he claimed that LLDAP was defaulting to MySQL despite talking to a PostgreSQL database. I don't know enough about databases to verify, but his suggestion of using all-caps for LLDAP\_Database\_url turned out to be helpful in reverse; I already had the all-caps, version, but duplicating the environment variable let me though:
Copy code
Environment=LLDAP_Database_url=postgres://lldapuser:lldappass@lldap-postgresql/lldap
Environment=LLDAP_DATABASE_URL=postgres://lldapuser:lldappass@lldap-postgresql/lldap
a
message has been deleted
2 Views