Chapter 6.237Command-Line UtilitiesThis chapter contains reference information on command-line utilities used with Red Hat DirectoryServer (Directory Server). These command-line utilities make it easy to perform administration taskson the Directory Server.6.1. Finding and Executing Command-Line UtilitiesThe ldapsearch, ldapmodify, ldapdelete, and ldappasswd command-line utilities are providedas a separate package, called either mozldap-tools or mozldap6-tools, and the utilities areinstalled in /usr/lib/mozldap or /usr/lib/mozldap6, respectively. Depending on the packageinstalled on the system, add the path to the PATH environment variable to use the command-lineutilities.NOTEFor most Linux systems, OpenLDAP tools are already installed in the /usr/bin/directory. These OpenLDAP tools are not supported for Directory Server operations. Forthe best results with the Directory Server, make sure the path to the Mozilla LDAP toolscomes first in the PATH or use the full path and file name for every LDAP operation. Touse Mozilla LDAP tools, ensure that /usr/lib/mozldap or /usr/lib/mozldap6appears in the PATH variable before /usr/bin.These OpenLDAP tools can be used for Directory Server operations with certain cautions:• The output of the other tools may be different, so it may not look like the examples inthe documentation.• The OpenLDAP tools require a -x argument to disable SASL so that it can be used fora simple bind, meaning the -D and -w arguments or an anonymous bind.• The OpenLDAP tools' arguments for using TLS/SSL and SASL are quite different thanthe Mozilla LDAP arguments. See the OpenLDAP documentation for instructions onthose arguments.The ldif and dbscan command-line utilities are stored in the /usr/bin directory.6.2. Using Special CharactersWhen using the ldapsearch command-line utility, it may be necessary to specify values that containcharacters that have special meaning to the command-line interpreter, such as space ( ), asterisk (*),and backslash (\). When this situation occurs, enclose the value in quotation marks (""). For example:-D "cn=Barbara Jensen, ou=Product Development, dc=example,dc=com"Depending on the command-line interpreter, use either single or double quotation marks for thispurpose. See the operating system documentation for more information.Additionally, commas in DN values must be escaped with a backslash. For example:-D "cn=Patricia Fuentes, ou=people, dc=example,dc=Bolivia\, S.A."