Install OpenLDAP Server on AlmaLinux 10 with cn=config (slapd from EPEL)

OpenLDAP on AlmaLinux series, part 1. This part installs and configures the server. Part 2 adds users and groups with LDIF (posixAccount/posixGroup), part 3 adds TLS/LDAPS and part 4 covers replication with syncrepl.

OpenLDAP is still the simplest way to run a small, standards-based LDAP directory for Linux logins, sudo rules, automount maps, mail routing or application authentication. On AlmaLinux 10 there is one catch before you start: the OpenLDAP server is not in BaseOS or AppStream. Red Hat stopped shipping openldap-servers with RHEL 8 (it recommends 389 Directory Server / IdM instead), and AlmaLinux follows RHEL. The client tools and libraries are still in BaseOS, and the server package, slapd, comes from EPEL 10.

This guide installs OpenLDAP 2.6 on AlmaLinux 10 from EPEL and configures it the modern way, through the cn=config (OLC, “online configuration”) backend with ldapmodify -Y EXTERNAL -H ldapi:///. You will set the suffix, root DN and root password, load the cosine, nis and inetorgperson schemas, add indexes and basic ACLs, create the base DN entries, open the firewall, check SELinux, and verify everything with ldapsearch, ldapwhoami and slapcat.

The cn=config changes, LDIF files and the error messages in the troubleshooting table were run against the EL10 slapd 2.6.13 build from EPEL with the AlmaLinux 10 openldap-clients 2.6.13 tools. Package names and versions were checked against the AlmaLinux 10 and EPEL 10 repository metadata.

Applies to: AlmaLinux 10.x (10.3 at the time of writing), with openldap-servers 2.6.13 from EPEL 10 and openldap/openldap-clients 2.6.13 from BaseOS. The same steps work on RHEL 10, Rocky Linux 10 and Oracle Linux 10 with EPEL enabled. The EPEL build of openldap-servers depends on the exact version of the OS openldap library, so keep both up to date together.

Lab layout

HostIPRole
ldap1.example.lan192.168.1.70OpenLDAP provider (this guide)
client1.example.lan192.168.1.71Test client with openldap-clients (used in parts 2 and 3)
ldap2.example.lan192.168.1.72Reserved for the second server in part 4 (replication)
SettingValue used here
Base DN (suffix)dc=example,dc=lan
Directory administrator (root DN)cn=admin,dc=example,dc=lan
Organizational unitsou=People,dc=example,dc=lan, ou=Groups,dc=example,dc=lan
Database backendmdb (LMDB) in /var/lib/ldap
Configurationcn=config in /etc/openldap/slapd.d (never edit these files by hand)
Working directory for LDIF files/root/ldap

Replace example.lan with your own domain. The usual convention is one dc= component per DNS label, so corp.example.com becomes dc=corp,dc=example,dc=com.

Prerequisites

  • AlmaLinux 10 minimal or server install with root or sudo access, and outbound HTTPS to the AlmaLinux mirrors and EPEL.
  • A static IP and a fully qualified host name that resolves (DNS or /etc/hosts). Part 3 issues a TLS certificate for this name, so pick it now.
  • Working time sync (chronyd is enabled by default). Replication in part 4 and Kerberos/SASL setups depend on it.
  • firewalld running (the default) and SELinux in enforcing mode (also the default). Nothing in this guide needs SELinux disabled.
sudo hostnamectl set-hostname ldap1.example.lan
echo "192.168.1.70  ldap1.example.lan ldap1" | sudo tee -a /etc/hosts

hostname -f                       # ldap1.example.lan
getenforce                        # Enforcing
chronyc tracking | grep -E "Leap|System time"
sudo dnf -y upgrade

Where the OpenLDAP server comes from on AlmaLinux 10

PackageRepositoryWhat it gives you
openldapBaseOSlibldap/liblber libraries and /etc/openldap/ldap.conf (installed on almost every system)
openldap-clientsBaseOSldapsearch, ldapadd, ldapmodify, ldapdelete, ldappasswd, ldapwhoami
openldap-serversEPEL 10slapd, slapadd, slapcat, slappasswd, slaptest, overlays, schema files and slapd.service
symas-openldap-serversSymas repository (third party)Symas OpenLDAP builds for RHEL 10 (2.6.x), installed under /opt/symas with their own paths
389-ds-baseAppStream389 Directory Server, the LDAP server Red Hat supports (a different product, not OpenLDAP)

This series uses the EPEL package because it uses the standard paths (/etc/openldap, /var/lib/ldap) that the SELinux policy already knows about. EPEL is a community repository maintained by Fedora volunteers. It is not covered by a RHEL or AlmaLinux support contract, so watch EPEL updates for openldap-servers the same way you watch the OS. If you need a vendor-supported OpenLDAP, look at the Symas packages. Their file locations differ, so the paths in this series will not match.

Step 1: Enable EPEL and install OpenLDAP

On AlmaLinux, epel-release is in the extras repository that is enabled by default. The EPEL documentation also recommends enabling CRB (CodeReady Builder) because many EPEL packages need it. openldap-servers itself only needs BaseOS and AppStream, but turning on CRB now saves trouble later.

sudo dnf -y install epel-release
sudo dnf config-manager --set-enabled crb
sudo dnf makecache

dnf info openldap-servers | grep -E "^(Name|Version|Release|Repository)"

Expected output (versions change as updates are released):

Name         : openldap-servers
Version      : 2.6.13
Release      : 1.el10_3
Repository   : epel
sudo dnf -y install openldap-servers openldap-clients
rpm -q openldap openldap-clients openldap-servers
slapd -VV
@(#) $OpenLDAP: slapd 2.6.13 (May 26 2026 00:00:00) $
	openldap

The package creates the ldap system user and group (UID/GID 55), the empty database directory /var/lib/ldap, and /usr/lib/systemd/system/slapd.service. Its install script also builds a starter cn=config tree in /etc/openldap/slapd.d from /usr/share/openldap-servers/slapd.ldif. That starter config loads only the core schema and defines an mdb database for the placeholder suffix dc=my-domain,dc=com with root DN cn=Manager,dc=my-domain,dc=com and no password. You fix all of that below.

Step 2: Start slapd

sudo systemctl enable --now slapd
systemctl status slapd --no-pager
sudo ss -tlnpx | grep slapd

The unit starts slapd -u ldap -h "ldap:/// ldaps:/// ldapi:///", so you will see listeners on TCP 389 and 636 and the local socket /run/ldapi. Port 636 accepts connections but cannot complete a TLS handshake until part 3 adds a certificate. Do not open it in the firewall yet.

Before every start the unit runs /usr/libexec/openldap/check-config.sh. It runs slaptest as the ldap user and checks database and certificate permissions, so a broken config shows up as a failed ExecStartPre in systemctl status slapd.

How cn=config works (and why you use ldapi:/// and EXTERNAL)

With cn=config, slapd stores its own configuration as LDAP entries under the special suffix cn=config, written to disk as LDIF files in /etc/openldap/slapd.d. You change it while slapd is running with ldapmodify/ldapadd, and changes take effect immediately with no restart. The rules:

  • Never edit files in /etc/openldap/slapd.d by hand. Each file carries a CRC32 checksum, and hand edits cause ldif_read_file: checksum error warnings or worse. Always go through LDAP, or use slapmodify/slapadd -n0 with slapd stopped.
  • The config database (olcDatabase={0}config) only grants manage access to gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth, which is the identity slapd gives to root connecting over the ldapi:/// Unix socket with SASL EXTERNAL. So every config change below is run as root with -Y EXTERNAL -H ldapi:///, and no config password is needed.
  • The numbers in braces, such as olcDatabase={2}mdb and {0} in front of ACLs, are ordering indexes that slapd adds. Use the exact DN slapd shows you.

Look at the starter configuration:

sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config "(olcDatabase=*)" dn olcSuffix olcRootDN
dn: olcDatabase={-1}frontend,cn=config

dn: olcDatabase={0}config,cn=config

dn: olcDatabase={1}monitor,cn=config

dn: olcDatabase={2}mdb,cn=config
olcSuffix: dc=my-domain,dc=com
olcRootDN: cn=Manager,dc=my-domain,dc=com

Note that the data database is {2}mdb, not {1}, because the package also defines a monitor database. That matters later for slapcat -n.

Step 3: Generate the admin password hash with slappasswd

sudo mkdir -m 700 -p /root/ldap && cd /root/ldap
slappasswd
New password:
Re-enter new password:
{SSHA}qUWtU0HKI7S567VmLA1/YmikoBa/KmTm

slappasswd uses salted SHA-1 ({SSHA}) by default, and every run produces a different hash for the same password. Copy your own output into the next file. The root DN bypasses all ACLs, so give it a long, unique password and use it only for administration. Applications should bind with their own service accounts (part 2).

Step 4: Set the suffix, root DN and root password (olcSuffix, olcRootDN, olcRootPW)

cat > /root/ldap/01-database.ldif <<'EOF'
dn: olcDatabase={2}mdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=example,dc=lan
-
replace: olcRootDN
olcRootDN: cn=admin,dc=example,dc=lan
-
add: olcRootPW
olcRootPW: {SSHA}qUWtU0HKI7S567VmLA1/YmikoBa/KmTm
EOF

sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f /root/ldap/01-database.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "olcDatabase={2}mdb,cn=config"

The lone - lines separate the modifications inside one change record, and slapd applies the record atomically. Use replace: for olcRootPW instead of add: when you change the password later. Since the file contains the password hash, lock it down with chmod 600 or delete it after use.

The starter monitor database still grants read access to the old cn=Manager,dc=my-domain,dc=com. Point it at the new admin:

cat > /root/ldap/02-monitor.ldif <<'EOF'
dn: olcDatabase={1}monitor,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=admin,dc=example,dc=lan" read by * none
EOF

sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f /root/ldap/02-monitor.ldif

Step 5: Load the cosine, nis and inetorgperson schemas

Only core is loaded at this point. User and group entries need more:

SchemaWhy you need it
cosineRFC 4524 attributes such as uid, mail and dc-related object classes. nis and inetorgperson both depend on it, so it loads first.
nisRFC 2307 posixAccount, posixGroup, shadowAccount, uidNumber, gidNumber, homeDirectory, loginShell. Required for Linux logins through SSSD (part 2).
inetorgpersonThe inetOrgPerson object class for people entries (cn, sn, givenName, mail, displayName).
for s in cosine nis inetorgperson; do
  sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/$s.ldif
done

sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=schema,cn=config dn
dn: cn=schema,cn=config

dn: cn={0}core,cn=schema,cn=config

dn: cn={1}cosine,cn=schema,cn=config

dn: cn={2}nis,cn=schema,cn=config

dn: cn={3}inetorgperson,cn=schema,cn=config

Order matters. If inetorgperson is loaded before cosine, slapd rejects it with AttributeType not found: "audio". Schemas are add-only in practice: loading one twice fails with Duplicate attributeType, which is harmless. The .ldif versions in /etc/openldap/schema are the ones to load. The .schema files are for the old slapd.conf format.

Step 6: Add indexes for the attributes you will search

The starter database indexes objectClass, ou, cn, mail, surname and givenname. SSSD and getent look up users and groups by uid, uidNumber, gidNumber and memberUid, and replication in part 4 needs entryCSN and entryUUID. Add those now, while the database is empty and indexing is instant:

cat > /root/ldap/03-indexes.ldif <<'EOF'
dn: olcDatabase={2}mdb,cn=config
changetype: modify
add: olcDbIndex
olcDbIndex: uid eq,pres
olcDbIndex: uidNumber,gidNumber eq
olcDbIndex: memberUid eq
olcDbIndex: entryCSN,entryUUID eq
EOF

sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f /root/ldap/03-indexes.ldif

On a database that already has data, slapd builds new indexes in the background when you add them over cn=config. Unindexed searches still work, but they are slow and slapd logs <= mdb_equality_candidates: (uid) not indexed, which is your signal to add an index.

Step 7: Basic ACLs (olcAccess)

With no olcAccess on the database, slapd falls back to its documented default, access to * by * read, which lets anyone, including anonymous clients, read everything. For a directory that will hold user accounts, start from a deny-by-default policy:

cat > /root/ldap/04-acl.ldif <<'EOF'
dn: olcDatabase={2}mdb,cn=config
changetype: modify
add: olcAccess
olcAccess: {0}to attrs=userPassword
  by self write
  by anonymous auth
  by * none
olcAccess: {1}to attrs=shadowLastChange
  by self write
  by users read
  by * none
olcAccess: {2}to *
  by users read
  by * none
EOF

sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f /root/ldap/04-acl.ldif
sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b "olcDatabase={2}mdb,cn=config" olcAccess
dn: olcDatabase={2}mdb,cn=config
olcAccess: {0}to attrs=userPassword by self write by anonymous auth by * none
olcAccess: {1}to attrs=shadowLastChange by self write by users read by * none
olcAccess: {2}to * by users read by * none

How to read these rules:

  • slapd checks the to clauses in order and uses the first one that matches the target. Inside it, the first matching by clause wins. Specific rules (passwords) go first, the catch-all to * goes last.
  • userPassword: a user may change their own password (self write), an anonymous connection may use it only to authenticate (that is what makes a simple bind work), and nobody else can read the hashes.
  • shadowLastChange: users update it when they change their password through PAM/SSSD.
  • to * by users read: any successfully bound identity can read the directory. Anonymous clients see nothing. Search results for them come back as No such object (32) because slapd does not even reveal that the base DN exists.
  • The root DN cn=admin,dc=example,dc=lan is not affected by ACLs, and root over ldapi:/// still manages cn=config.
  • The continuation lines start with two spaces. LDIF removes the first space when it joins the line, and the second one keeps the words apart. A single space glues write and by together and the ACL is rejected.

Anonymous binds are still allowed (clients such as SSSD use them to read the root DSE), they just cannot read data. To refuse anonymous binds completely, add olcDisallows: bind_anon to cn=config, as described in Disable OpenLDAP Anonymous Access. Do that after part 2, once your clients bind with a service account.

Step 8: Turn on useful logging

The default log level logs almost nothing. stats logs one line per connection, bind, search and result, which is what you want while setting things up:

cat > /root/ldap/05-loglevel.ldif <<'EOF'
dn: cn=config
changetype: modify
replace: olcLogLevel
olcLogLevel: stats
EOF

sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f /root/ldap/05-loglevel.ldif
sudo journalctl -u slapd -f

slapd logs through syslog, and journald stores it under the slapd unit, so journalctl -u slapd shows the lines. On a busy server, stats is noisy. Drop back to olcLogLevel: none or send it to a file through rsyslog later.

Step 9: Create the base DN and organizational units

The configuration is done. Now add the first data entries: the base entry itself and two containers that part 2 fills with users and groups. This is a normal LDAP operation, so you bind as the root DN over the network port (-x -D ... -W prompts for the password from step 3):

cat > /root/ldap/10-base.ldif <<'EOF'
dn: dc=example,dc=lan
objectClass: top
objectClass: dcObject
objectClass: organization
o: Example LAN
dc: example

dn: ou=People,dc=example,dc=lan
objectClass: organizationalUnit
ou: People

dn: ou=Groups,dc=example,dc=lan
objectClass: organizationalUnit
ou: Groups
EOF

ldapadd -x -H ldap://ldap1.example.lan -D cn=admin,dc=example,dc=lan -W -f /root/ldap/10-base.ldif
Enter LDAP Password:
adding new entry "dc=example,dc=lan"

adding new entry "ou=People,dc=example,dc=lan"

adding new entry "ou=Groups,dc=example,dc=lan"

The dc: value must equal the first RDN of the DN (example), and blank lines separate entries. Never put a trailing space after a value. LDIF keeps it as part of the value, which leads to entries that look right but never match.

Step 10: Set client defaults in /etc/openldap/ldap.conf

Save yourself typing -H and -b on every command. This file is read by the OpenLDAP client tools (not by slapd and not by SSSD):

sudo tee -a /etc/openldap/ldap.conf <<'EOF'
BASE   dc=example,dc=lan
URI    ldap://ldap1.example.lan
EOF

The file already contains SASL_NOCANON on; leave it. Part 3 adds TLS_CACERT here and switches the URI to ldaps://.

Step 11: Open the firewall

Only open LDAP to the networks that need it. On a lab or a trusted LAN:

sudo firewall-cmd --permanent --add-service=ldap
sudo firewall-cmd --reload
sudo firewall-cmd --list-services

Better, limit it to your client subnet with a rich rule:

sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" service name="ldap" accept'
sudo firewall-cmd --reload

The ldaps service (636) is added in part 3. More zone and rich-rule examples are in the firewalld cheat sheet. Remember that plain LDAP on 389 sends simple-bind passwords in clear text until you add TLS, so keep it inside a trusted network for now.

Step 12: SELinux notes

The targeted policy has a full slapd_t domain, and the EPEL package uses the paths it expects, so nothing needs to be changed for a standard install. Check the labels and ports:

ps -eZ | grep slapd
ls -dZ /etc/openldap/slapd.d /var/lib/ldap
sudo semanage port -l | grep ldap_port_t
system_u:system_r:slapd_t:s0      1234 ?        00:00:00 slapd
system_u:object_r:slapd_db_t:s0 /etc/openldap/slapd.d
system_u:object_r:slapd_db_t:s0 /var/lib/ldap
ldap_port_t                    tcp      389, 636, 3268, 3269, 7389

You only need changes when you leave the defaults:

You want toDo this
Store the database somewhere else, for example /srv/ldapsudo semanage fcontext -a -t slapd_db_t "/srv/ldap(/.*)?" then sudo restorecon -Rv /srv/ldap and chown -R ldap:ldap /srv/ldap
Listen on a non-standard port such as 1389sudo semanage port -a -t ldap_port_t -p tcp 1389
Keep TLS certificates for part 3Use /etc/openldap/certs (labelled slapd_cert_t) or /etc/pki/tls (cert_t). Copy files into place with install or cp, not mv, or run restorecon.
Find out why slapd was blockedsudo ausearch -m AVC -ts recent -c slapd

Verification

1. The root DSE shows the naming context (readable anonymously by design):

ldapsearch -x -LLL -s base -b "" namingContexts supportedLDAPVersion
dn:
namingContexts: dc=example,dc=lan
supportedLDAPVersion: 3

2. Authenticated search of the new tree:

ldapsearch -x -LLL -D cn=admin,dc=example,dc=lan -W dn
dn: dc=example,dc=lan

dn: ou=People,dc=example,dc=lan

dn: ou=Groups,dc=example,dc=lan

3. ACLs hide data from anonymous clients:

ldapsearch -x -LLL dn
No such object (32)

4. Who am I, and does the password work?

ldapwhoami -x -D cn=admin,dc=example,dc=lan -W
dn:cn=admin,dc=example,dc=lan

A wrong password returns ldap_bind: Invalid credentials (49).

5. From a client (client1, after sudo dnf -y install openldap-clients), the same search should work across the network:

ldapsearch -x -H ldap://ldap1.example.lan -b dc=example,dc=lan -D cn=admin,dc=example,dc=lan -W -LLL dn

6. Offline view with slapcat. slapcat reads the database files directly and is safe to run while slapd is up with the mdb backend. Select the database by suffix, because -n 1 on this layout is the monitor database and fails with database doesn't support necessary operations:

sudo slapcat -b dc=example,dc=lan | head -15
sudo slapcat -n 0 | grep -E "^dn: (olcDatabase|cn=\{)"     # cn=config
dn: dc=example,dc=lan
objectClass: top
objectClass: dcObject
objectClass: organization
o: Example LAN
dc: example
structuralObjectClass: organization
entryUUID: a0e86378-7845-1041-8106-fd85984fef3b
creatorsName: cn=admin,dc=example,dc=lan
createTimestamp: 20261119091620Z
entryCSN: 20261119091620.885352Z#000000#000#000000
modifiersName: cn=admin,dc=example,dc=lan
modifyTimestamp: 20261119091620Z

7. Config syntax and the monitor database:

sudo -u ldap slaptest -u
ldapsearch -x -LLL -D cn=admin,dc=example,dc=lan -W -b cn=monitor -s base monitoredInfo
config file testing succeeded

dn: cn=Monitor
monitoredInfo: OpenLDAP: slapd 2.6.13 (May 26 2026 00:00:00)

Back up the configuration and the data now

A working cn=config is worth saving before parts 2 to 4 change it. slapcat produces LDIF that slapadd can restore:

sudo install -d -m 700 /root/ldap-backup
sudo slapcat -n 0 -l /root/ldap-backup/config-$(date +%F).ldif
sudo slapcat -b dc=example,dc=lan -l /root/ldap-backup/data-$(date +%F).ldif

To restore, stop slapd, move the old /etc/openldap/slapd.d and /var/lib/ldap contents aside, run slapadd -n 0 -F /etc/openldap/slapd.d -l config.ldif then slapadd -F /etc/openldap/slapd.d -b dc=example,dc=lan -l data.ldif, fix ownership with chown -R ldap:ldap /etc/openldap/slapd.d /var/lib/ldap, run restorecon -R on both and start slapd. Put the backup commands in a nightly timer once the directory holds real data.

Troubleshooting

Symptom or errorLikely causeFix
No match for argument: openldap-serversEPEL not enabled (the package is not in BaseOS/AppStream)dnf install epel-release, then dnf makecache
ldap_modify: Insufficient access (50) with SASL username: gidNumber=1000+uidNumber=1000,...ldapmodify ran as a normal user, so EXTERNAL mapped to that UIDRun it with sudo; only UID/GID 0 over ldapi:/// manages cn=config
ldap_sasl_interactive_bind: Can't contact LDAP server (-1) on ldapi:///slapd not running, or a custom socket pathsystemctl status slapd; check the -h list in the unit and use the matching ldapi:// URL
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) from a clientFirewall, DNS, wrong port, or ldaps:// before TLS is configuredfirewall-cmd --list-all, ss -tlnp | grep slapd, test with ldap:// and the IP
ldap_bind: Invalid credentials (49)Wrong password, wrong bind DN (still cn=Manager,dc=my-domain,dc=com?), or olcRootPW never addedCheck olcRootDN/olcRootPW with the ldapsearch from step 4; re-run slappasswd and replace: olcRootPW
ldap_add: Server is unwilling to perform (53), no global superior knowledgeThe entry DN is outside every configured suffix (for example still dc=my-domain,dc=com)Fix olcSuffix or the DNs in your LDIF so they match
ldap_add: No such object (32) with matched DNThe parent entry does not exist (e.g. adding a user before ou=People)Add the base and OU entries first; order entries parent-before-child in the LDIF
No such object (32) on a search that should find entriesAnonymous search blocked by the ACLs (by design), or wrong baseBind with -D ... -W; check BASE in /etc/openldap/ldap.conf
AttributeType not found: "audio" when loading inetorgpersoncosine schema not loaded yetLoad cosine.ldif first, then nis and inetorgperson
Other (e.g., implementation specific) error (80), Duplicate attributeTypeThat schema is already loadedNothing to fix; check with ldapsearch ... -b cn=schema,cn=config dn
ldap_add: Invalid syntax (21), objectClass: value #0 invalid per syntaxUnknown object class: a typo or a schema that is not loadedCheck spelling and loaded schemas
ldapmodify: wrong attributeType at line NMissing - separator between two modifications in one change recordPut a line with a single - between each add:/replace:/delete: block
slapd fails to start, check-config.sh errors in systemctl statusConfig error, or files in slapd.d//var/lib/ldap owned by root after a restore or a slapadd run as rootsudo -u ldap slaptest -u; chown -R ldap:ldap /etc/openldap/slapd.d /var/lib/ldap; restorecon -R both
ldif_read_file: checksum error in the logSomeone edited a file in slapd.d by handRevert the edit and make the change with ldapmodify; restore from a slapcat -n 0 backup if needed
slapcat: database doesn't support necessary operations-n 1 picked the monitor databaseUse slapcat -b dc=example,dc=lan (or -n 2)
mdb_equality_candidates: (uid) not indexed in the logSearches on an attribute without an indexAdd an olcDbIndex as in step 6
AVC denials for slapd_tNon-default database path, port or certificate locationSee the SELinux table; ausearch -m AVC -ts recent -c slapd

What is next

The server is running with a real suffix, an admin DN, the schemas Linux accounts need, indexes, deny-by-default ACLs and a firewall rule. Part 2 adds people and groups with LDIF (posixAccount, posixGroup, shadowAccount), sets user passwords with ldappasswd and creates a read-only bind account for SSSD. Part 3 then issues a certificate from a private CA, the same workflow as in MariaDB TLS and troubleshooting, and enables StartTLS and LDAPS on port 636.

If you want single sign-on on top of the directory, the MIT Kerberos KDC on AlmaLinux 10 series pairs well with OpenLDAP: LDAP stores the accounts and groups, and Kerberos handles the passwords and tickets.

Leave a Reply

Your email address will not be published. Required fields are marked *