SLAPAUTH(8C)

πŸ’– SLAPAUTH(8C) β€” the slapauth manual page, bestie edition πŸ’–

okay so this is slapauth, and it lives in section 8C of the manual (that's the admin/commands section, iykyk). It's the little tool that checks a list of string-represented IDs for LDAP authc/authz. It's giving "identity bouncer" energy and honestly? iconic.


✨ NAME ✨

slapauth β€” check a list of string-represented IDs for LDAP authc/authz 🫢


🌸 SYNOPSIS 🌸

/usr/bin/slapauth [-d debug-level] [-f slapd.conf] [-F confdir]
[-M mech] [-o option[=value]] [-R realm] [-U authcID] [-v] [-X authzID]
ID [...]

πŸ’… DESCRIPTION πŸ’…

So slapauth is the vibe-check tool for slapd's identity mapping. Like, it checks how the behavior of slapd maps identities for authentication and authorization purposes β€” exactly as specified in slapd.conf(5).

Here's the tea: it opens the slapd.conf(5) configuration file or the slapd-config(5) backend, reads in the authz-policy/olcAuthzPolicy and authz-regexp/olcAuthzRegexp directives, and then it parses the ID list you handed it on the command line. That's it. That's the whole job. Lowkey elegant. πŸ’œ


πŸŽ€ OPTIONS πŸŽ€

  • -d debug-level β€” turn on debugging messages, as defined by the specified debug-level; peep slapd(8) for the deets. πŸ”
  • -f slapd.conf β€” point it at an alternative slapd.conf(5) file, if you're feeling spicy.
  • -F confdir β€” specify a config directory. And listen, this one has layers: if you pass both -f and -F, the config file gets read, converted into config-directory format, and written straight into the directory you specified. If you pass neither option, it'll first attempt to read the default config directory before it even tries the default config file. And if a valid config directory exists? The default config file gets ignored. Periodt. πŸ’…
  • -M mech β€” specify a mechanism.
  • -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))
  • -R realm β€” specify a realm.
  • -U authcID β€” specify an ID to be used as authcID throughout the whole test session. Heads up bestie: if it's present, and if no authzID is given, then the IDs in the ID list get treated as authzID.
  • -X authzID β€” specify an ID to be used as authzID throughout the test session. If it's present, and if no authcID is given, the IDs in the ID list get treated as authcID. And if both authcID and authzID are given via command line switch? The ID list cannot be present. no cap. πŸ™ˆ
  • -v β€” enable verbose mode. she's chatty and we love that for her ✨

🌈 EXAMPLES 🌈

okay so this command:

/usr/bin/slapauth -f //etc/openldap/slapd.conf -v \
       -U bjorn -X u:bjensen

tests whether the user bjorn can assume the identity of the user bjensen β€” provided the directives

authz-policy from
authz-regexp "^uid=([^,]+).*,cn=auth$"
     "ldap:///dc=example,dc=net??sub?uid=$1"

are defined in slapd.conf(5). chef's kiss, main character behavior πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ 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.


and that's the whole page fr fr 🫢 this was OpenLDAP 2.7.2, dated 2026/10/21, section SLAPAUTH(8C) β€” stan a reliable little utility, periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from