ldapmodify :: LDAP Shell Commands

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.


Symlabs is now part of Quest Software. A leader in simplifying and reducing the cost of IT management, Quest’s innovative solutions make solving the toughest IT management problems easier, enabling more than 100,000 customers worldwide to save time and money across physical, virtual and cloud environments. The addition of Symlabs virtual directory and federation technology will enhance the overall architecture of the Quest® One Identity Solution and Quest migration products. Learn more at www.quest.com/symlabs.