.SH SYNOPSIS
.B ldapsearch
[\c
+.BR \-V [ V ]]
+[\c
+.BI \-d \ debuglevel\fR]
+[\c
.BR \-n ]
[\c
+.BR \-v ]
+[\c
.BR \-c ]
[\c
.BR \-u ]
[\c
-.BR \-v ]
-[\c
.BR \-t [ t ]]
[\c
.BI \-T \ path\fR]
[\c
.BR \-L [ L [ L ]]]
[\c
-.BR \-M [ M ]]
-[\c
.BI \-S \ attribute\fR]
[\c
-.BI \-d \ debuglevel\fR]
+.BI \-b \ searchbase\fR]
+[\c
+.BR \-s \ { base \||\| one \||\| sub \||\| children }]
+[\c
+.BR \-a \ { never \||\| always \||\| search \||\| find }]
+[\c
+.BI \-l \ timelimit\fR]
+[\c
+.BI \-z \ sizelimit\fR]
[\c
.BI \-f \ file\fR]
[\c
+.BR \-M [ M ]]
+[\c
.BR \-x ]
[\c
.BI \-D \ binddn\fR]
[\c
.BI \-p \ ldapport\fR]
[\c
-.BI \-b \ searchbase\fR]
-[\c
-.BR \-s \ { base \||\| one \||\| sub \||\| children }]
-[\c
-.BR \-a \ { never \||\| always \||\| search \||\| find }]
-[\c
.BR \-P \ { 2 \||\| 3 }]
[\c
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
[\c
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
[\c
-.BR \-o \ \fIopt\fP [ =\fIoptparam\fP ]]
-[\c
-.BI \-l \ timelimit\fR]
-[\c
-.BI \-z \ sizelimit\fR]
+.BI \-o \ opt \fR[= optparam \fR]]
[\c
.BI \-O \ security-properties\fR]
[\c
[\c
.BR \-Q ]
[\c
+.BR \-N ]
+[\c
.BI \-U \ authcid\fR]
[\c
.BI \-R \ realm\fR]
Option \fI\-L\fP controls the format of the output.
.SH OPTIONS
.TP
+.BR \-V [ V ]
+Print version info.
+If \fB\-VV\fP is given, only the version information is printed.
+.TP
+.BI \-d \ debuglevel
+Set the LDAP debugging level to \fIdebuglevel\fP.
+.B ldapsearch
+must be compiled with LDAP_DEBUG defined for this option to have any effect.
+.TP
.B \-n
Show what would be done, but don't actually perform the search. Useful for
debugging in conjunction with \fB\-v\fP.
.TP
+.B \-v
+Run in verbose mode, with many diagnostics written to standard output.
+.TP
.B \-c
Continuous operation mode. Errors are reported, but ldapsearch will continue
with searches. The default is to exit after reporting an error. Only useful
Include the User Friendly Name form of the Distinguished Name (DN)
in the output.
.TP
-.B \-v
-Run in verbose mode, with many diagnostics written to standard output.
-.TP
.BR \-t [ t ]
A single \fB\-t\fP writes retrieved non-printable values to a set of temporary
files. This is useful for dealing with values containing non-character
A third \fB\-L\fP disables printing of the LDIF version.
The default is to use an extended version of LDIF.
.TP
-.BR \-M [ M ]
-Enable manage DSA IT control.
-.B \-MM
-makes control critical.
-.TP
.BI \-S \ attribute
Sort the entries returned based on \fIattribute\fP. The default is not
to sort entries returned. If \fIattribute\fP is a zero-length string (""),
option defeats this behavior, causing all entries to be retrieved,
then sorted, then printed.
.TP
-.BI \-d \ debuglevel
-Set the LDAP debugging level to \fIdebuglevel\fP.
-.B ldapsearch
-must be compiled with LDAP_DEBUG defined for this option to have any effect.
+.BI \-b \ searchbase
+Use \fIsearchbase\fP as the starting point for the search instead of
+the default.
+.TP
+.BR \-s \ { base \||\| one \||\| sub \||\| children }
+Specify the scope of the search to be one of
+.BR base ,
+.BR one ,
+.BR sub ,
+or
+.B children
+to specify a base object, one-level, subtree, or children search.
+The default is
+.BR sub .
+Note:
+.I children
+scope requires LDAPv3 subordinate feature extension.
+.TP
+.BR \-a \ { never \||\| always \||\| search \||\| find }
+Specify how aliases dereferencing is done. Should be one of
+.BR never ,
+.BR always ,
+.BR search ,
+or
+.B find
+to specify that aliases are never dereferenced, always dereferenced,
+dereferenced when searching, or dereferenced only when locating the
+base object for the search. The default is to never dereference aliases.
+.TP
+.BI \-l \ timelimit
+wait at most \fItimelimit\fP seconds for a search to complete.
+A timelimit of
+.I 0
+(zero) or
+.I none
+means no limit.
+A timelimit of
+.I max
+means the maximum integer allowable by the protocol.
+A server may impose a maximal timelimit which only
+the root user may override.
+.TP
+.BI \-z \ sizelimit
+retrieve at most \fIsizelimit\fP entries for a search.
+A sizelimit of
+.I 0
+(zero) or
+.I none
+means no limit.
+A sizelimit of
+.I max
+means the maximum integer allowable by the protocol.
+A server may impose a maximal sizelimit which only
+the root user may override.
.TP
.BI \-f \ file
Read a series of lines from \fIfile\fP, performing one LDAP search for
will exit when the first non-successful search result is returned,
unless \fB\-c\fP is used.
.TP
+.BR \-M [ M ]
+Enable manage DSA IT control.
+.B \-MM
+makes control critical.
+.TP
.B \-x
Use simple authentication instead of SASL.
.TP
Specify an alternate TCP port where the ldap server is listening.
Deprecated in favor of \fB\-H\fP.
.TP
-.BI \-b \ searchbase
-Use \fIsearchbase\fP as the starting point for the search instead of
-the default.
-.TP
-.BR \-s \ { base \||\| one \||\| sub \||\| children }
-Specify the scope of the search to be one of
-.BR base ,
-.BR one ,
-.BR sub ,
-or
-.B children
-to specify a base object, one-level, subtree, or children search.
-The default is
-.BR sub .
-Note:
-.I children
-scope requires LDAPv3 subordinate feature extension.
-.TP
-.BR \-a \ { never \||\| always \||\| search \||\| find }
-Specify how aliases dereferencing is done. Should be one of
-.BR never ,
-.BR always ,
-.BR search ,
-or
-.B find
-to specify that aliases are never dereferenced, always dereferenced,
-dereferenced when searching, or dereferenced only when locating the
-base object for the search. The default is to never dereference aliases.
-.TP
.BR \-P \ { 2 \||\| 3 }
Specify the LDAP protocol version to use.
.TP
[!]<oid>[=<value>]
.fi
.TP
-.BR \-o \ \fIopt\fP [ =\fIoptparam\fP ]
+.BI \-o \ opt \fR[= optparam \fR]
Specify general options.
ldif-wrap=<width> (in columns, or "no" for no wrapping)
.fi
.TP
-.BI \-l \ timelimit
-wait at most \fItimelimit\fP seconds for a search to complete.
-A timelimit of
-.I 0
-(zero) or
-.I none
-means no limit.
-A timelimit of
-.I max
-means the maximum integer allowable by the protocol.
-A server may impose a maximal timelimit which only
-the root user may override.
-.TP
-.BI \-z \ sizelimit
-retrieve at most \fIsizelimit\fP entries for a search.
-A sizelimit of
-.I 0
-(zero) or
-.I none
-means no limit.
-A sizelimit of
-.I max
-means the maximum integer allowable by the protocol.
-A server may impose a maximal sizelimit which only
-the root user may override.
-.TP
.BI \-O \ security-properties
Specify SASL security properties.
.TP
.B \-Q
Enable SASL Quiet mode. Never prompt.
.TP
+.B \-N
+Do not use reverse DNS to canonicalize SASL host name.
+.TP
.BI \-U \ authcid
Specify the authentication ID for SASL bind. The form of the ID
depends on the actual SASL mechanism used.