ldapmodify

 


 
 
 
 User Commands                                       ldapmodify(1)
 
 
 


NAME

ldapmodify, ldapadd - ldap entry addition and modification tools

SYNOPSIS

ldapmodify [ -a ] [ -b ] [ -c ] [ -r ] [ -n ] [ -v ] [ -F ] [ -d debuglevel ] [ -D binddn ] [ -w passwd ] [ -h ldaphost ] [ -M authentication ] [ -p ldapport ] [ -f file ] [ -l nb-ldap-connections ] /opt/SUNWconn/ldap/bin/ldapadd [ -b ] [ -c ] [ -n ] [ -v ] [ -F ] [ -d debuglevel ] [ -D binddn ] [ -w passwd ] [ -h ldaphost ] [ -p ldapport ] [ -f file ] [ -l nb- ldap-connections ]

DESCRIPTION

ldapmodify opens a connection to an LDAP server, binds, and modifies or adds entries. The entry information is read from standard input or from file, specified using the -f option. ldapadd is implemented as a hard link to the ldapmodify tool. When invoked as ldapadd the -a (add new entry) option is turned on automatically. Both ldapadd and ldapmodify reject duplicate attribute- name/value pairs for the same entry.

OPTIONS

-a Add new entries. The default for ldapmodify is to modify existing entries. If invoked as ldapadd, this option is always set. -b Assume that any value that starts with a / is the pathname of a file containing the actual attribute value. This is useful for attribute values in binary format. -c Continuous operation mode. Errors are reported, but ldapmodify continues with modifications. The default is to exit after reporting an error. -r Replace existing value with the specified value. This is the default for ldapmodify. When ldapadd is called, or if the -a option is specified, the -r option is ignored. -n Preview modifications, but make no changes to entries. Useful in conjunction with -v and -d for debugging. -v Use verbose mode, with diagnostics written to standard output. -F Force application of all changes regardless of the SunOS 5.8 Last change: 25 May 1998 1 User Commands ldapmodify(1) content of input lines that begin replica: . By default, replica: lines are compared against the LDAP server host and port in use to decide whether a replog record should be applied. -d debuglevel Set the LDAP debugging level. Useful levels of debug- ging for ldapmodify and ldapadd are: 1 Trace 2 Packets 4 Arguments 32 Filters 128 Access control To request more than one category of debugging infor- mation, add the masks. For example, to request trace and filter information, specify a debuglevel of 33. -f file Read the entry modification information from file instead of from standard input. -D binddn Use the distinguished name binddn to bind to the directory. -w passwd Use passwd as the password for authentication to the directory. -h ldaphost Specify an alternate host on which the slapd server is running. -M authentication Specifies the authentication mechanism used to bind to the directory. This option can have the value CRAM- MD5. The bind DN and bind password are mandatory with this option. -p ldapport Specify an alternate TCP port where the slapd server is listening. -l nb-ldap-connections SunOS 5.8 Last change: 25 May 1998 2 User Commands ldapmodify(1) Specifies the number of LDAP connections that ldapadd or ldapmodify will open to process the modifications in the directory. The default is one connection. EXAMPLES Example 1: The format of the content of file (or standard input if no -f option is specified) is illustrated in the examples below. 1. The file /tmp/entrymods contains the following modifica- tion instructions: dn: cn=Modify Me, o=XYZ, c=US changetype: modify replace: mail mail: modme@atlanta.xyz.com - add: title title: System Manager - add: jpegPhoto jpegPhoto: /tmp/modme.jpeg - delete: description - The command: example% ldapmodify -b -r -f /tmp/entrymods modifies the "Modify Me" entry as follows: a. The current value of the mail attribute is replaced with the value "modme@atlanta.xyz.com" b. A title attribute with the value "System Manager" is added c. A jpegPhoto attribute is added, using the contents of the file /tmp/modme.jpeg as the attribute value d. The description attribute is removed Example 2: The file /tmp/newentry contains the following information for creating a new entry: dn: cn=Ann Jones, o=XYZ, c=US objectClass: person cn: Ann Jones cn: Annie Jones sn: Jones title: Director of Research and Development SunOS 5.8 Last change: 25 May 1998 3 User Commands ldapmodify(1) mail: ajones@londonrd.xyz.us.com uid: ajones The command: example% ldapad -f /tmp/newentry adds a new entry for Ann Jones, using the information in the file. Example 3: The file /tmp/badentry contains the following information about an entry to be deleted: dn: cn=Ann Jones, o=XYZ, c=US changetype: delete the command: example% ldapmodify -f /tmp/badentry removes Ann Jones' entry.

ATTRIBUTES

See attributes(5) for a description of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWlldap (32-bit) | |_____________________________|_____________________________| | | SUNWldapx (64-bit) | |_____________________________|_____________________________| | Stability Level | Evolving | |_____________________________|_____________________________|

SEE ALSO

ldapadd(1), ldapdelete(1), ldapmodrdn(1), ldapsearch(1)

DIAGNOSTICS

Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error. SunOS 5.8 Last change: 25 May 1998 4