SLAPSCHEMA(8C)
π SLAPSCHEMA β the 8C section girlie π
okay so bestie, welcome to SLAPSCHEMA(8C) β yes that's section 8C, the admin-tools-and-daemons section, and yes she's iconic. This is the in-database schema checking utility that ships with SLAPD, aka the OpenLDAP standalone daemon's little truth-teller. She reads your database and goes "ma'amβ¦ this entry does not comply." π«Ά
β¨ NAME β¨
slapschema β the SLAPD in-database schema checking utility πΈ
π SYNOPSIS π
/usr/bin/slapschema [-afilter] [-bsuffix] [-c] [-ddebug-level]
[-fslapd.conf] [-Fconfdir] [-g] [-HURI] [-lerror-file] [-ndbnum]
[-ooption[=value]] [-ssubtree-dn] [-v]
like. look at her. so many little flags. so much power. π
π DESCRIPTION π
So slapschema is literally here to check whether the contents of a slapd(8) database actually comply with the schema. She opens the database you point her at β determined by the database number or the suffix β and then she goes through its contents and checks them against the corresponding schema. Errors get written to standard output, or to a file if you specified one. π
Also!! Databases that are configured as subordinate to the one you picked get output too β unless you pass -g, in which case they mind their own business.
ngl here's the real tea: admins sometimes need to change existing schema items. We're talking:
- adding new required attributes to
objectClasses - removing existing required or allowed attributes from
objectClasses - entirely removing
objectClasses - or literally any other change that could take perfectly valid entries and make them β¨no longer compliantβ¨ with the modified schema
And the whole point of running slapschema after you modify the schema is that she points out the inconsistencies right then instead of letting them lurk and jump out later when inconsistent entries need to be modified. π«£
Some behaviour notes so you're not surprised:
- The entry records are checked in database order, not superior-first order. she does not do hierarchy-coreography, she does a straight walk.
- The entry records are checked considering all (user and operational) attributes stored in the database.
- Dynamically generated attributes (like
subschemaSubentry) are not considered. she said dynamic? not her problem. π
π OPTIONS π
-afilter β Only check entries matching the asserted filter. For example:
slapschema -a \
"(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
will check all but the "ou=People,dc=example,dc=com" subtree of the "dc=example,dc=com" database. Deprecated; use -H ldap:///???(filter) instead. π
-bsuffix β Use the specified suffix to determine which database to check. By default, the first database that supports the requested operation is used. And bestie, careful:-bcannot be used in conjunction with the-noption. they don't get along. π«-cβ Enable continue mode, aka ignore errors and keep going. she's unbothered, moisturized, in her lane.-ddebug-level β Enable debugging messages as defined by the specified debug-level; seeslapd(8)for the deets. π-fslapd.conf β Specify an alternativeslapd.conf(5)file. bring your own config, queen.-Fconfdir β Specify a config directory. If both-fand-Fare specified, the config file will be read and converted to config directory format and written to the specified directory. If neither option is specified, an attempt to read the default config directory will be made before trying to use the default config file. And if a valid config directory exists, then the default config file is ignored. periodt. β¨-gβ Disable subordinate gluing. Only the specified database will be processed, and not its glued subordinates (if any). no plus-ones allowed. π-HURI β Use dn, scope and filter from URI to only handle matching entries. the glow-up replacement for-aand-s, iykyk. π-lerror-file β Write errors to the specified file instead of standard output. π-ndbnum β Check the dbnum-th database listed in the configuration file. The config databaseslapd-config(5), is always the first database, so use-n 0
And the same rules apply: the -n cannot be used in conjunction with the -b option. π
-ooption[=value] β Specify an option with a(n optional) value. 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))
-ssubtree-dn β Only check entries in the subtree specified by this DN. Implies-b subtree-dnif no-bnor-noption is given. Deprecated; use-H ldap:///subtree-dninstead. π«-vβ Enable verbose mode. she will tell you EVERYTHING. π£οΈ
β οΈ LIMITATIONS β οΈ
Okay this one matters, bestie, so listen up. For some backend types, your slapd(8) should not be running (at least, not in read-write mode) when you do this, so you can ensure consistency of the database. π₯
It is always safe to run slapschema with the slapd-mdb(5), and slapd-null(5) backends. those two? certified safe. no notes. π
πΈ EXAMPLES πΈ
To check the schema compliance of your SLAPD database after modifications to the schema, and put any error in a file called errors.ldif, give the command:
/usr/bin/slapschema -l errors.ldif
look at her go. one line. doing the most. π
π¦ SEE ALSO π¦
ldap(3)ldif(5)slapd(8)"OpenLDAP Administrator's Guide"(http://www.OpenLDAP.org/doc/admin/)
π 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.
okay that's the whole page, you ate that, go forth and check your schema bestie π«Ά
this was OpenLDAP 2.7.2, dated 2026/10/21, page SLAPSCHEMA(8C) β mwah, no cap π β¨
π¦ where this page comes from
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 1998-2026 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms