U.S. +1 (312) 214 3570  |  E.U +34 (91) 320-5524

LDAP Shell Commands :: ldapmodify

Description
 
Ldapmodify opens a connection to an LDAP server, binds and modifies entries with information read from a file (-f option) or from the standard input.
 
Syntax
 
ldapmodify
[-a] [-c] [-S file] [-n] [-v] [-k]
[-K] [-M[M]] [-d debuglevel] [-D binddn]
[-W] [-w passwd] [-y passwdfile] [-H ldapuri]
[-h ldaphost] [-p ldapport] [-P 2|3]
[-O security-properties] [-I] [-Q]
[-U authcid] [-R realm] [-x]
[-X authzid] [-Y mech] [-Z[Z]] [-f file]
 
-c
Continuous operation mode. If an error is found when an entry is being modified, it is reported, but ldapmodify will continue.
-h ldaphost
Specifies an alternate host on which the LDAP server is running
-p ldapport Specifies the TCP port where LDAP server is listening
-D binddn Binddn is the distinguished name used to bind to the LDAP server
-w passwd Use passwd as the password for simple authentication
-f file Read the modification information from file.

Example
 
The following command:
 
ldapmodify -c -h 10.63.3.200 -p 1389
-D "cn=SalesManager, ou=people,dc=mycompany,dc=com"
-w abc123 -f /tmp/Modifies.info
 
will try to apply modifications described in "/tmp/Modifies.info" file in the LDAP server in host 10.63.3.200 listening on port 1389 binding as "cn=SalesManager...".
 
Result
 
If the contents of "/tmp/Modifies.info" are:
 
dn: did=2002090100004,ou=products,dc=mycompany,dc=com
changetype: modify
replace: price
price: 500
-
delete: memorySize
-
add: provider
provider: IBM

dn: did=2003051000004,ou=products,dc=mycompany,dc=com
changetype: delete
 
Two entries in the LDAP server are modified. The second one is deleted, and the first one has its memorySize attribute removed, its price attribute changed to 500 and a new attribute called provider added with "IBM" as value.
 

Errors modifying an entry result in a non-zero exit status and a diagnostic message being written to standard error.


About Symlabs
 
Symlabs is the performance leader for virtual directory and identity management solutions.   Benchmarks show Symlabs Virtual Directory Server, LDAP Proxy and Federated Identity Suite are the fastest and most powerful products in the industry for managing and unifying identity data.   Global giants like Sony, IBM, Vodafone, Nokia and United Nations already depend on Symlabs to add flexibility, security, and reliability to their infrastructure.  Symlabs also offers annual support, training and professional services to our clients to help them develop, integrate, and maintain solutions.