Table 6.1. commonly-used command-line utilities, Ldapsearch, Syntax – Red Hat 8.1 User Manual

Page 176: Section 6.4, “ldapsearch

Advertising
background image

Table 6.1. Commonly-Used Command-Line Utilities

Command-Line Utility

Description

ldapsearch

Searches the directory and returns search
results in LDIF format. For details on this tool, see
the "Finding Directory Entries" appendix in the
Directory Server Administrator's Guide.

ldapmodify

Adds, deletes, modifies, or renames entries. All
operations are specified using LDIF update
statements. For details on this tool, see "Adding
and Modifying Entries Using ldapmodify" in the
"Creating Directory Entries" chapter in the
Directory Server Administrator's Guide.

ldapdelete

Deletes entries in the directory. For information on
using this utility, see "Deleting Entries Using
ldapdelete" in the "Creating Directory Entries"
chapter in the Directory Server Administrator's
Guide
.

ldappasswd

Changes users passwords with the password
change extended operation. For more information
on the password extended change operation, see
the "Managing the Password Policy" section of
the "Managing User Accounts and Passwords"
chapter in the Directory Server Administrator's
Guide
.

ldif

Automatically formats LDIF files and creates base
64-encoded attribute values. For details on this
tool, see appendix A in the Directory Server
Administrator's Guide
.

dbscan

Analyzes and extracts information from a
Directory Server database file.

6.4. ldapsearch

ldapsearch is a configurable utility that locates and retrieves directory entries via LDAP. This utility
opens a connection to the specified server using the specified distinguished name and password and
locates entries based on a specified search filter. Search scopes can include a single entry, an entry's
immediate subentries, or an entire tree or subtree. Search results are returned in LDIF format.

Syntax
Commonly-Used ldapsearch Options
Persistent Search Options
SSL Options
SASL Options
Additional ldapsearch Options

Syntax

ldapsearch -b basedn -s scope [ optional_options ] "(attribute=filter)" [
optional_list_of_attributes ]

For any value that contains a space ( ), the value should be enclosed in double quotation marks. For
example:

-b "ou=groups, dc=example,dc=com"

176

Chapter 6. Command-Line Utilities

Advertising