ldapadd

The ldapadd utility is used to add email entry tools. The entry information is read from standard input or from a file, specified using the -f option. The ldapadd command is a variant of the ldapmodify command. When invoked as ldapadd, the -a (add new entry) flag is turned on automatically. Additional information about modifying email entry tools can be found in the following section entitled "ldapmodify."


Syntax

 
ldapadd [ -bcnv ] [ -d debug_level ] [ -D binddn ] [-w my_password ] [ -h host ]\
[ -p lda_port ] [-f filename ]
 

The options for this command are:

[ -b ]  

Designates attribute values in binary format.  

[ -c ]  

Specifies continuous operation mode. Errors are reported, but ldapadd continues operations.  

[ -n ]  

Displays what could be done, but doesn't actually modify entries. (This is especially useful when using debugging options -d or -v.)  

[ -v ]  

Writes detailed (verbose) diagnostic messages to the log.  

[ -d debug_level ]  

Turns on the debugging mode and specifies a debug level:

  • 1 - Trace
  • 2 - Packets
  • 4 - Arguments
  • 32 - Filters
  • 128 - Access control
  • To request more than one category of debugging information, add the numbers designating the modes you want to use; for example, if you want to request trace and filter information, add 1 (for Trace) and 32 (for Filters) for a debug value of 33.  

    [ -D binddn ]  

    Specifies a particular Distinguished Name (DN) to bind to the directory.  

    [ -w password ]  

    Specifies the password to use for access to a directory.  

    [ -h ldap_hostname ]  

    Specifies an alternate host on which to run the slapd server.  

    [ -p lda_portID ]  

    Specifies an alternate TCP port where the slapd server is listening.  

    [ -f filename ]  

    Reads the entry modification information from a specific file instead of from standard input.  


    Example



     
    dn: cn=Ann Jones, o=XYZ, c=US
    
     
    objectClass: person
    
     
    cn: Ann Jones
    
     
    cn: Annie Jones
    
     
    sn: Jones
    
     
    title: Director of Research and Development
    
     
    mail: ajones@londonrd.xyz.us.com
    
     
    uid: ajones
    
     

    The following file, /tmp/newentry, contains information for adding an entry:

    The following command adds a new entry for Ann Jones, using the information in the file.

     
    % ldapadd -f /tmp/newentry
    
     




    Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.