Monitoring OpenBSD’s LDAP daemon

OpenBSD ships with an LDAP daemon since 4.8. I have an all-in-one server from which the LDAP service has to be shipped out. I’m going to replace that OpenLDAP daemon with the LDAP daemon from OpenBSD 5.1. I already wrote about how to enable LDAP on OpenBSD 4.8.

Those will be updated notes for OpenBSD 5.1 and additional directions to allow monitoring the LDAP activity using SNMP and Xymon server.

Continue reading “Monitoring OpenBSD’s LDAP daemon”

Backup LDAP entries with ldapsearch

I have a LDAP instance running the OpenBSD’s ldapd. I installed the openldap-client package so that I get ldapsearch, but there doesn’t seem to be any slapcat-like tool ; which may be used to backup the LDAP content in LDIF format.

Here’s a trick to dump the ldapd content using ldapsearch:

# ldapsearch -x -H ldaps:// -D "cn=admin,dc=tumfatig,dc=net" -W -b "dc=tumfatig,dc=net" -LLL > ldapd-"`date +%Y%m%d`".ldif

This generates a file in LDIF format which can be used by ldapadd to fill another LDAP instance.