Bug#1144741: slapd: /var/lib/ldap is not created when slapd/no_configuration is set
Daniel Teichmann
daniel.teichmann at das-netzwerkteam.de
Tue Aug 18 14:13:24 BST 2026
Package: slapd
Version: 2.6.14+dfsg-1
Severity: important
Tags: patch
slapd: /var/lib/ldap is not created when slapd/no_configuration is set
When slapd is installed with “slapd/no_configuration=true” (manual configuration, as done e.g. by the Debian Edu installer for the main server Tjener), /var/lib/ldap is no longer created since openldap 2.6.13+dfsg-1, breaking slapadd, slapd itself and the Debian Edu tjener LDAP bootstrap.
Since 2.6.13+dfsg-1 the openldap user is created via systemd-sysusers (debian/slapd.sysusers) instead of adduser.
The previous code ran |# adduser --system --home /var/lib/ldap --shell /bin/false ...| which creates the home directory as a side effect.
systemd-sysusers only sets the home directory field in the user database and does not create the directory.
The postinst only creates /var/lib/ldap via create_ldap_directories() in the initial debconf-driven configuration path, which is skipped when manual configuration is requested.
Nothing creates the directory then, so slapadd fails with “mdb_open: cannot open database directory /var/lib/ldap” and the Debian Edu Tjener LDAP bootstrap aborts during installation.
How to reproduce
1.
|# debootstrap forky ./tmp-forky-bootstrap http://deb.debian.org/debian|
2.
|# chroot ./tmp-forky-bootstrap /bin/bash|
3.
Preseed:
|# echo "slapd slapd/no_configuration boolean true" | debconf-set-selections|
(the full main-server preseed is in debian-edu-install package at preseed-values/defaults.main-server)
4.
|# DEBIAN_FRONTEND=noninteractive apt-get install -y slapd|
5.
|# ls -ld /var/lib/ldap| # -> No such file or directory
With 2.6.10+dfsg-1 (trixie) the directory exists after installation (created by adduser), so this is a regression introduced by 2.6.13+dfsg-1.
--
Daniel Teichmann
DAS-NETZWERKTEAM
Telefon: 0176 322 774 51
GnuPG Key ID: ED9F2F7A36E0D99349CC1940B500EFC78100A778
daniel.teichmann at das-netzwerkteam.de,https://das-netzwerkteam.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-openldap-devel/attachments/20260818/2417ae2e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Ensure-var-lib-ldap-is-created-even-with-manual-conf.patch
Type: text/x-patch
Size: 1505 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-openldap-devel/attachments/20260818/2417ae2e/attachment.bin>
More information about the Pkg-openldap-devel
mailing list