B.3 LDAP Tools
OpenLDAP's set
of LDAP client tools can be used to communicate with any LDAPv3
server (see Table B-6).
Option | Description |
|---|---|
-d integer | Specifies what debugging information to log. See the loglevel slapd.conf parameter for a listing of log levels. |
-D binddn | Specifies the DN to use for binding to the LDAP server. |
-e [!]ctrl[=ctrlparam] | Defines an LDAP control to be used on the current operation. See also the -M option for the manageDSAit control. |
-f filename | Specifies the file containing the LDIF entries to be used in the operations. |
-H URI | Defines the LDAP URI to be used in the connection request. |
-I | Enables the SASL "interactive" mode. By default, the client prompts for information only when necessary. |
-k | Enables Kerberos 4 authentication. |
-K | Enables only the first step of the Kerberos 4 bind for authentication. |
-M-MM | Enable the Manager DSA IT control. This option is necessary when modifying an entry that is a referral or an alias. -MM requires that the Manager DSA IT control be supported by the server. |
-n | Does not perform the search; just displays what would be done. |
-O security_properties | Defines the SASL security properties for authentication. See previous information on the sasl-secprops parameter in slapd.conf. |
-P [2|3] | Defines which protocol version to use in the connection (Version 2 or 3). The default is LDAP v3. |
-Q | Suppresses SASL-related messages such as how the authentication mechanism is used, username, and realm. |
-R sasl_realm | Defines the realm to be used by the SASL authentication mechanism. |
-U username | Defines the username to be used by the SASL authentication mechanism. |
-v | Enables verbose mode. |
-w password | Specifies the password to be used for authentication. |
-W | Instructs the client to prompt for the password. |
-x | Enables simple authentication. The default is to use SASL authentication. |
-X id | Defines the SASL authorization identity. The identity has the form dn:dn oru:user. The default is to use the same authorization identity that the user authenticated. |
-y passwdfile | Instructs the ldap tool to read the password for a simple bind from the given filename. |
-Y sasl_mechanism | Tells the client which SASL mechanism should be used. The bind request will fail if the server does not support the chosen mechanism. |
-Z-ZZ | Issue a StartTLS request. Use of -ZZ makes the support of this request mandatory for a successful connection. |
B.3.1 ldapadd(1), ldapmodify(1)
These
tools send updates to directory servers (see Table B-7).
Option | Description |
|---|---|
-a | Adds entries. This option is the default for ldapadd. |
-r | Replaces (or modifies) entries and values. This is the default for ldapmodify. |
-F | Forces all change records to be used from the input. |
B.3.2 ldapcompare(1)
This tool
asks a directory server to compare two values:
ldapcompare [options] DN <attr:value|attr::b64value>.
There are no additional command-line flags for this tool.
B.3.3 ldapdelete(1)
This tool
deletes entries from an LDAP directory (see Table B-8).
Option | Description |
|---|---|
-r | Deletes the subtree whose root is designated by DN. The delete is not performed atomically. |
B.3.4 ldapmodrdn(1)
This tool
changes the RDN of an entry in an LDAP directory (see Table B-9).
Option | Description |
|---|---|
-c | Instructs ldapmodrdn to continue if errors occur. By default, it terminates if there is an error. |
-r | Removes the old RDN value. The default behavior is to add another value of the RDN and leave the old value intact. The default behavior makes it easier to modify a directory without leaving orphaned entries. |
-s new_superior_node | Defines the new superior, or parent, entry under which the renamed entry should be located. |
B.3.5 ldappasswd(1)
This tool
changes the password stored in a directory entry (see Table B-10).
Option | Description |
|---|---|
-a secret | The old password value |
-A | Prompt for the old password |
-s new_secret | The new password value |
-S | Prompt for the new password |
B.3.6 ldapsearch(1)
This tool
issues LDAP search queries to directory servers (see Table B-11).
•
Table of Contents
•
Index
•
Reviews
•
Reader Reviews
•
Errata
LDAP System Administration
By
Gerald Carter
Publisher
: O''''Reilly
Pub Date
: March 2003
ISBN
: 1-56592-491-6
Pages
: 308
If you want to be a master of your domain, LDAP
System Administration will help you get up and
running quickly regardless of which LDAP version you use.
After reading this book, even with no previous LDAP
experience, you''''ll be able to integrate a directory server
into essential network services such as mail, DNS, HTTP, and
SMB/CIFS.