---
name: "ldapctl"
section: "8"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/ldapctl"
---

# ldapctl(8)

control the LDAP daemon

## NAME

**ldapctl** – control the LDAP daemon

## SYNOPSIS

**ldapctl** \[**-v**\] \[**-f** *file*\] \[**-r** *directory*\] \[**-s** *socket*\] *command* \[*argument* *...*\]

## DESCRIPTION

The **ldapctl** program controls the [ldapd(8)](/ldapd/8.md) daemon.

The options are as follows:

- **-f** *file*

  Use *file* as the configuration file, instead of the default */etc/ldapd.conf*.

- **-r** *directory*

  Store and read database files in *directory*, instead of the default */var/db/ldap*.

- **-s** *socket*

  Use *socket* instead of the default */var/run/ldapd.sock* to communicate with [ldapd(8)](/ldapd/8.md).

- **-v**

  Produce more verbose output.

The commands are as follows:

- **stats**

  Show statistics counters.

- **log** **brief**

  Disable verbose debug logging.

- **log** **verbose**

  Enable verbose debug logging.

- **compact**

  Compact all databases. [ldapd(8)](/ldapd/8.md) does not have to be running. When compaction of a database file is complete, a special marker is appended to the database file that tells [ldapd(8)](/ldapd/8.md) to reopen the file and perform new requests against the compacted database. A write transaction is opened to force other processes to buffer write requests while performing compaction. Read requests are handled without disruption.

- **index**

  Re-index all databases. [ldapd(8)](/ldapd/8.md) does not have to be running.

## FILES

- */var/run/ldapd.sock*

  default **ldapctl** control socket

- */etc/ldapd.conf*

  default [ldapd(8)](/ldapd/8.md) configuration file

## SEE ALSO

[ldapd.conf(5)](/ldapd.conf/5.md), [ldapd(8)](/ldapd/8.md)

## HISTORY

The **ldapctl** program first appeared in OpenBSD 4.8.
