Command and Tool Reference

LDAP Directory Tools

 

Examples

 

The following configuration variables are defined in the user's

 

configuration file as ~/.ux_ldap_admin_rc:

 

LDAP_BINDDN="cn=Directory Manager"

 

LDAP_HOST=”myhost

 

The Command

 

ldapentry -a passwd UserA

 

will try to bind to the directory on server myhost as Directory Manager,

 

prompt for the credentials, and retrieve the service search descriptor

 

from the profile LDIF file based on the service name passwd. It will then

 

open the template file with the editor defined by the environment

 

variable EDITOR and collect the input to pass it to ldapmodify to add the

 

new entry.

 

The Command

 

ldapentry -m "uid=UserA, ou=People, o=hp.com"

 

will try to bind to the directory on server myhost as Directory Manager,

 

prompt for the credentials, and use the entered DN to retrieve the entry

 

from the directory.

 

It will then populate a template with the retrieved information, and

 

collect the changes to pass to ldapmodify for execution.

 

 

NOTE

Although the ldapentry tool will allow the users to modify any

 

information on the EDITOR window, the directory server has the final

 

decision on accepting the modification. If the user makes an invalid

 

LDIF syntax, violates the directory’s schema or does not have the

 

priviledge to perform the modificaiton, the ldapentry tool will report the

 

error after the EDITOR window is closed when it tries to update the

 

directory server with the information. The user will be given the option

 

to re-enter the EDITOR and correct the error.

 

 

ldapsearch

You use the ldapsearch command-line utility to locate and retrieve LDAP directory entries. This utility opens a connection to the specified server using the specified distinguished name and password, and locates

Chapter 5

157

Page 171
Image 171
HP UX LDAP-UX Integration Software manual Ldapsearch