jspωiki
Replace Modification-type

Overview[1]#

Replace Modification-type is a LDAP ModifyRequest Operation within an Modify Request

If the modify Request is a Replace Modification-type and there is an attribute description without any values, then all values for the specified attribute will be removed from the entry.

If the modify Request is a Replace Modification-type and the specified attribute does not exist in the entry, then this will have no effect.

If the modify Request is a Replace Modification-type and there and there is an attribute description with one or more values, then any existing values for the specified attribute values will be removed and replaced with the provided set of values.

If the modify Request is a Replace Modification-type and the specified attribute did not previously have any values in the entry, then the provided set of values will be added.

LDIF Examples#

The following example replaces the existing mail value with the specified value, jdoe@novell.com. If the attribute is MULTI-VALUE, all values are removed and the specified value is added. If the attribute doesn't exist, it is added with the specified value.
version: 1

dn: cn=johndoe, ou=provo, ou=users, o=novell
changetype: modify
replace: mail
mail: jdoe@novell.com

Modify Replace Modification-type - specify Multiple Modifications in a single LDIF record)#

The following example adds a telephone number, deletes the fax telephone number attribute, and replaces the mail attribute. A line containing only a hyphen character is used to mark the end of an attribute entry.

version: 1

dn: cn=johndoe, ou=provo, ou=users, o=novell
changetype: modify
add: telephonenumber
telephonenumber: 555 555-5555
-
delete: facsimileTelephoneNumber
-
replace: mail
mail: jdoe@novell.com

More Information#

There might be more information for this subject on one of the following: