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

LDAP Shell Commands :: ldapadd

Description
 
Ldapadd opens a connection to an LDAP server, binds and adds entries. The entries information is read from standard input or from a file. Ldapadd is implemented as a hard link to ldapmodify with the -a flag turned on.
 
Syntax
 
ldapadd
[-c] [-S file] [-n] [-v] [-k] [-K] [-M[M]]
[-d debuglevel] [-D binddn] [-W] [-w passwd]
[-y passwdfile] [-h ldaphost] [-p ldap-port]
[-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 added, it is reported, but ldapadd will continue with adds.
-h ldaphost
Specifies and alternate host on which 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 LDAP server
-w passwd Use passwd as the password for simple authentication
-f file
Read the entries to add from file.

Example
 
The following command:
 
ldapadd -c -h 10.63.3.200 -p 1389
-D "cn=James Bond, ou=people, dc=mycompany, dc=com"
-w drymartini -f /tmp/BondEnemies.ldif
 
will try to add, binding as "cn=James Bond..." to the LDAP server in host 10.63.3.200 listening on port 1389, the entries defined in file "/tmp/BondEnemies.ldif" skipping the ones that return an error.
 
Result
 
The input (file or standard input) expected by ldapadd command is also written in ldif format. A valid (if the schema is well defined) "/tmp/BondEnemies.ldif" file for the example would be
 
dn: id=47,ou=people,dc=mycompany,dc=com
objectClass: person
objectClass: villain
name: Dr. No
userpassword: ruletheworld
organization: Spectra
dangerLevel: 7
dn: id=53,ou=people,dc=mycompany,dc=com
objectClass: person
objectClass: villain
name: Goldfinger
userpassword: nomore007
organization: Stand-alone villain
dangerLevel: 8
 
If no errors occur, the command will return a zero. Errors 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.