.lf 1 stdin
.TH SLAPAUTH 8C "2008/05/07" "OpenLDAP 2.4.9"
.\" Copyright 2004-2008 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
.SH NAME
slapauth \- Check a list of string-represented IDs for LDAP authc/authz
.SH SYNOPSIS
.B /usr/local/sbin/slapauth
.B [\-d level]
.B [\-f slapd.conf]
.B [\-F confdir]
.B [\-M mech]
.B [\-o name[=value]]
.B [\-R realm]
.B [\-U authcID]
.B [\-v]
.B [\-X authzID]
.B ID [...]
.LP
.SH DESCRIPTION
.LP
.B Slapauth
is used to check the behavior of the slapd in mapping identities 
for authentication and authorization purposes, as specified in 
.BR slapd.conf (5).
It opens the
.BR slapd.conf (5)
configuration file, reads in the 
.B authz-policy
and
.B authz-regexp
directives, and then parses the 
.B ID
list given on the command-line.
.LP
.SH OPTIONS
.TP
.BI \-d " level"
enable debugging messages as defined by the specified
.IR level ;
see
.BR slapd (8)
for details.
.TP
.BI \-f " slapd.conf"
specify an alternative
.BR slapd.conf (5)
file.
.TP
.BI \-F " confdir"
specify a config directory.
If both
.B -f
and
.B -F
are 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. If a valid config directory exists then the
default config file is ignored.
.TP
.BI \-M " mech"
specify a mechanism.
.TP
.BI \-o " option[=value]"
Specify an
.BR option
with a(n optional)
.BR value .
Possible generic options/values are:
.LP
.nf
              syslog=<subsystems>  (see `\-s' in slapd(8))
              syslog-level=<level> (see `\-S' in slapd(8))
              syslog-user=<user>   (see `\-l' in slapd(8))

.fi
.TP
.BI \-R " realm"
specify a realm.
.TP
.BI \-U " authcID"
specify an ID to be used as 
.I authcID
throughout the test session.
If present, and if no
.B authzID
is given, the IDs in the ID list are treated as 
.BR authzID .
.TP
.BI \-X " authzID"
specify an ID to be used as 
.I authzID
throughout the test session.
If present, and if no
.B authcID
is given, the IDs in the ID list are treated as 
.BR authcID .
If both
.I authcID 
and
.I authzID
are given via command line switch, the ID list cannot be present.
.TP
.B \-v
enable verbose mode.
.SH EXAMPLES
The command
.LP
.nf
.ft tt
	/usr/local/sbin/slapauth -f //usr/local/etc/openldap/slapd.conf -v \\
            -U bjorn -X u:bjensen

.ft
.fi
tests whether the user
.I bjorn
can assume the identity of the user 
.I bjensen
provided the directives
.LP
.nf
.ft tt
	authz-policy from
	authz-regexp "^uid=([^,]+).*,cn=auth$"
		"ldap:///dc=example,dc=net??sub?uid=$1"

.ft
.fi
are defined in
.BR slapd.conf (5).
.SH "SEE ALSO"
.BR ldap (3),
.BR slapd (8)
.BR slaptest (8)
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
.lf 1 ./../Project
.\" Shared Project Acknowledgement Text
.B "OpenLDAP Software"
is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
.B "OpenLDAP Software"
is derived from University of Michigan LDAP 3.3 Release.  
.lf 141 stdin
