Deleting one value from an attribute with multiple values
About this task
Use the LDIF delete subcommand to delete a specific attribute value from an attribute.
Steps
-
Run the
ldapmodifytool from the command line. -
Specify the modification using
changetype:modify. -
Specify the attribute pair that you want to delete using
delete.Example:
The following sample assumes you have multiple values of
cnin an entry, such ascn: Sally Tree,cn: Sally Tea Tree. This sample keepscn:Sally Treeand deletes thecn: Sally Tea Tree.$ bin/ldapmodify -h server.example.com -p 389 -D "cn=admin,dc=example,dc=com" \ -w password dn: uid=user.2004,ou=People,dc=example,dc=com changetype: modify delete: cn cn: Sally Tea Tree