echothrust/howtos

A list of OpenBSD (mostly) material

View on GitHub

OpenBSD LDAP Tips


author: Pantelis Roditis date: unknown modified: 29/12/2022 note: This is quite old and probably heavily outdated


OpenBSD ldapd (ldapd.conf)

Setting up OpenBSD LDAPD(8)

Structure for the ldap will be as follows

Basic configuration

SSL configuration

Schemas

ACLS

Indexes

Populating the server

Maintenance

Every once in a while (and assuming a lot of changes have taken place on your ldap tree) it is good to compact and re-index your databases by executing the following commands respectively

Indexes

ldapctl compact
ldapctl index

In order to see statistics about the server you can execute

ldapctl stats

Backup

You can use slapcat(8) to generate an LDIF file.

slapcat -f slapd.conf -b "dc=echothrust,dc=net" -l echothrust.ldif

Restore

The fastest way to load initial data is from an LDIF file. Make sure slapd is not running when you do this.

 # kill -9 slapd
 # slapadd -b dc=echothrust,dc=net -l echothrust.ldif -f slapd.conf

References