SLAPTEST(8C)

πŸ’– SLAPTEST β€” the vibe check for your slapd config πŸ’–

okay bestie, this is slaptest from section 8C of the manual (that's the admin/commands one, iykyk) and honestly? she's a whole icon. she's the friend who reads your essay before you submit it and goes "girl. this is not going to compile." 🫢


✨ NAME ✨

slaptest β€” check the suitability of the OpenLDAP slapd configuration. that's it, that's the job, she's a config auditor and she takes it very seriously πŸ’…


🌸 SYNOPSIS 🌸

/usr/bin/slaptest [-d debug-level] [-f slapd.conf] [-F confdir]
[-ndbnum] [-o option[=value]] [-Q] [-u] [-v]

like, just call her and give her the flags. she'll handle it ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So slaptest is literally there to check the conformance of the slapd(8) configuration. no cap. she opens up your slapd.conf(5) configuration file or your slapd-config(5) backend, and parses it according to the general rules AND the backend-specific rules, checking its sanity. it's giving "certified quality inspector" energy πŸ”πŸ‘‘

if your config is a mess, she will let you know. periodt.


πŸ’… OPTIONS πŸ’…

  • -d debug-level β€” turn on debugging messages, as defined by the specified debug-level; peek at slapd(8) for the deets. (yes she'll yap if you let her πŸ™ˆ)
  • -f slapd.conf β€” point her at a different slapd.conf(5) file. your config, your choice, main character ✨
  • -F confdir β€” specify a config directory. ok listen, this one has LORE:
    • if you use both -f and -F, the config file gets read and converted to config directory format and written to the directory you specified. glow-up arc πŸ”₯
    • if you specify neither option, slaptest will try the default config directory first, before trying the default config file.
    • if a valid config directory exists, then the default config file is ignored. she's loyal, fr.
    • if dry-run mode is also specified, no conversion will occur.
    • > ⚠️ Note: this conversion may fail if used on a fresh config where the configured backends haven't been created yet. In that case, use slapcat(8) to do the conversion instead.

(imagine that, the fresh-config-to-conversion pipeline needs a different girlie. it happens 😭)

  • -n dbnum β€” just open and test the dbnum-th database listed in the configuration file. and if you only wanna test the config database slapd-config(5), use -n 0 because it's always the first database. she's always first. queen behavior πŸ‘‘
  • -o option[=value] β€” specify an option with a(n optional) value. the possible generic options/values are:
    • syslog=<subsystems> β€” (see -s in slapd(8))
    • syslog-level=<level> β€” (see -S in slapd(8))
    • syslog-user=<user> β€” (see -l in slapd(8))

like a little menu of extras, obsessed πŸŽ€

  • -Q β€” Be extremely quiet: only the exit code indicates success (0) or not (any other value). silent but deadly. she's not ignoring you, she's just communicating via vibes πŸ’€ (0 = slay, anything else = not slay)
  • -u β€” enable dry-run mode (i.e. don't fail if databases cannot be opened, but config is fine). pretend-run, no commitment, very mindful, very demure 🌸
  • -v β€” enable verbose mode. she'll tell you everything. and honestly? we love a chatty icon πŸ’–

🌈 EXAMPLES 🌈

To check a slapd.conf(5) give the command:

/usr/bin/slaptest -f //etc/openldap/slapd.conf -v

(and yes, that's two slashes in there, bestie β€” we copied it exactly, don't @ me, it's what the manpage says and we respect the manpage πŸ™ˆ)


πŸ”₯ SEE ALSO πŸ”₯

go read those if you want the full lore, iykyk πŸ“šβœ¨


πŸ‘‘ ACKNOWLEDGEMENTS πŸ‘‘

OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from the University of Michigan LDAP 3.3 Release. huge respect, they built the blueprint and we're just living in it 🫢


so yeah, that's slaptest(8C) β€” this page is from OpenLDAP 2.7.2, dated 2026/10/21. thanks for coming to my TED talk, go check your config before it checks you πŸ’€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from