The mod-entry-req command adds and removes attributes and values. If you use this command on an alias, it changes the alias, not the entry that the alias points to.
Note: You cannot use mod-entry-req to create an alias—use add-entry-req instead.
The command has the following format:
mod-entry-req entry = DN Modifications [common-args]
Defines the changes to be made to the entry. The format of the modifications options is as follows:
add-attr {attribute attribute-value [,attribute-value...]}
| add-values {attribute attribute-value [,attribute-value...]}
| rem-values {attribute attribute-value [,attribute-value...]}
| rem-attr attribute
[, ...]
The braces ({}) in the add-attr, add-values, and rem-values options are part of the command.
If two or more modifications are specified, they are separated by commas.
Specifies that an attribute is to be added. If the attribute already exists, add-attr is treated as if it were add-values.
Specifies that one or more values are to be added to an existing attribute. You cannot add a second value to a single-valued attribute.
Specifies that one or more values are to be removed from the attribute. Removing the last value removes the attribute.
Specifies that an attribute is to be removed from the entry. You cannot remove mandatory attributes.
Defines the common arguments. For more information, see common-args.
Example: Modify Service to Add Attributes
Add a fax number to organizational unit Corporate under organization Democorp:
mod-entry-req entry = <countryName "AU"> <organizationName "Democorp"> <organizationalUnitName "Corporate" > add-attr {facsimileTelephoneNumber "03-9727-9722" } ;
Example: Modify Service to Add and Remove Attributes
Add another phone number value for John Smith, and remove one of his common names—the non-distinguished value, J SMITH:
mod-entry-req entry = <countryName "AU"> <organizationName "Democorp"> <commonName "John Smith"> rem-values { commonName "J SMITH" }, add-values { telephoneNumber "03 9727 9111" };
See the test scripts for more examples.
Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |