Deleting All Values Of An Attribute Using Ldif - Red Hat DIRECTORY SERVER 7.1 - ADMINISTRATOR Administrator's Manual

Table of Contents

Advertisement

LDIF Update Statements
If the entry has multiple instances of the attribute, then, to change one of the
attribute values, you must delete the attribute value that you want to change and
then add the replacement value. For example, consider the following entry:
cn=Barney Fife,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
cn: Barney Fife
sn: Fife
telephonenumber: 555-1212
telephonenumber: 555-6789
To change the telephone number
update statement:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
delete: telephonenumber
telephonenumber: 555-1212
-
add: telephonenumber
telephonenumber: 555-4321
Barney's entry is now as follows:
cn=Barney Fife,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
cn: Barney Fife
sn: Fife
telephonenumber: 555-6789
telephonenumber: 555-4321

Deleting All Values of an Attribute Using LDIF

Use
changetype:modify
entry. If the entry has more than one instance of the attribute, you must indicate
which of the attributes you want to delete.
For example, the following LDIF update statement deletes all instances of the
telephonenumber
appears in the entry:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
delete: telephonenumber
If you want to delete just a specific instance of the
then you simply delete that specific attribute value. The following section
describes how to do this.
70
Red Hat Directory Server Administrator's Guide • May 2005
555-1212
with the delete operation to delete an attribute from an
attribute from the entry, regardless of how many times it
to
, use the following LDIF
555-4321
telephonenumber
attribute,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents