LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

Instead, use the -R option to remove arbitrary attributes. For information
about impacts when using this option, see Section 9.3.6.4 (page 320).
9.3.6.4 Warnings
Under common usage, ldapugmod uses the LDAP replace operation when changing values of an
attribute in an entry. This feature might impact attributes that have multiple values, by removing all
occurrences of an attribute value and replacing it with the one specified on the ldapugmod
command line. For example, if the -n argument is used to specify a new name for a posixGroup,
all occurances of the cn attribute are replaced by the value specified for the -n argument. This
mode of operation applies to all command argument specified values, including -u, -g, -s, -d,
-I and -c.
When you use the <attr>=<value> parameter to modify an existing attribute, the ldapugmod
command also uses the LDAP replace operation. The replace operation removes all occurrences
of the specified attribute for an entry and replaces it with the value specified. If there are multiple
values for a single attribute in an entry, the use of a single <attr>=<value> parameter will
replace all values with the single value specified on the command line. You may specify more than
one occurrence of the same attribute on the command line, if that attribute is multi-valued. In that
case, both values are created in the entry.
Use of -A or -R changes this behavior (for both the previously-listed command arguments and the
<attr>=<value> parameter). Any attribute specified as an argument to the -A or -R causes
ldapugmod to perform an LDAP add operation instead of an LDAP replace operation.
NOTE: The ldapugmod tool does not allow you to use the same attribute and value pair more
than once, either as part of <attr>=<value>, -R or -A, or with other command line options.
The ldapugmod tool exits with error status before sending any conflict modification request to the
LDAP directory server.
Example 1
In this example, an entry in an LDAP directory is as follows:
dn: uid=mLee,ou=people,dc=example,dc=com
cn: Mark Lee
cn: Michael Lee
uid: mlee
uidNumber: 2200
gidNumber: 212
homeDirectory: /home/mlee
loginShell: /usr/bin/ksh
gecos: Mark Lee,New York,555-666-6000
description: test user entry
description: multi-valued attribute entry
Perform the following ldapugmod command for the user entry, mlee:
cd /opt/ldapux/bin
./ldapugmod -t passwd mlee "cn=Mackey Lee"
The preceding commands replace all instances of cn with the single value, Mackey Lee. The
resulting mlee entry is as follows:
dn: uid=mLou,ou=people,dc=example,dc=com
cn: Mackey Lee
uid: mlee
uidNumber: 2200
gidNumber: 212
homeDirectory: /home/mlee
loginShell: /usr/bin/ksh
gecos: Mark Lee,New York,555-666-6000
description: test user entry
description: multi-valued attribute entry
320 Command and tool reference