https://bugs.openldap.org/show_bug.cgi?id=10524
Issue ID: 10524 Summary: slaptest attempts to open a new database, instead of creating it Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: nivanova@symas.com Target Milestone: ---
The issue appears when one decides to convert a slapd.conf file to cn=config, if slapd has never been started with said slapd.conf, and the slapd.conf contains a database definition.
For the purpose of testing another issue, I wrote a brand new slapd.conf and attempted to convert it into a brand new configuration directory, before starting up slapd.
Example slapd.conf:
database config rootdn cn=config rootpw secret
database mdb directory ./mdb_test suffix dc=ldap,dc=example,dc=com rootdn cn=admin,dc=ldap,dc=example,dc=com rootpw secret
I create the mdb_test directory and the configuration directory (crash.d) and run:
slapd -T test -f slap_mdb.conf -F crash.d
which fails: mdb_db_open: database "dc=ldap,dc=example,dc=com" cannot be opened: No such file or directory (2). Administrator intervention needed! backend_startup_one (type=mdb, suffix="dc=ldap,dc=example,dc=com"): bi_db_open failed! (2)
If I start slapd with the .conf file it starts up sucessfully and createds the database. After that a slaptest run succeeds, because the database already exists.
This is probably a rare use case, but I think we need to decide if this is desired behavior and fix it if not.
https://bugs.openldap.org/show_bug.cgi?id=10524
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Component|slapd |documentation
--- Comment #1 from Quanah Gibson-Mount quanah@openldap.org --- For new installations, slapcat should be used instead. slaptest is for converting existing known good configurations.
https://bugs.openldap.org/show_bug.cgi?id=10524
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.6.14 Assignee|bugs@openldap.org |hyc@openldap.org
https://bugs.openldap.org/show_bug.cgi?id=10524
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |IN_PROGRESS Ever confirmed|0 |1
--- Comment #2 from Howard Chu hyc@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/897
https://bugs.openldap.org/show_bug.cgi?id=10524
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- head:
• 8afcbe9e by Howard Chu at 2026-07-09T18:49:36+00:00 ITS#10524 slaptest: note it can fail on a fresh config
RE27:
• 804b6e2b by Howard Chu at 2026-07-21T13:47:46+00:00 ITS#10524 slaptest: note it can fail on a fresh config
RE26:
• 6998bcb3 by Howard Chu at 2026-07-21T13:48:08+00:00 ITS#10524 slaptest: note it can fail on a fresh config
https://bugs.openldap.org/show_bug.cgi?id=10524
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Resolution|TEST |FIXED