PreviousNext

Modifying Attribute Instances

Use the dcecp modify -change operation to change the values of attribute instances. Whether an attribute is modifiable is determined by the application that uses the attribute. For example, the following command changes the value assigned to the MVSname from admin to cell_admin for the principal named delores.

dcecp> principal modify delores -change {MVSname cell_admin}
dcecp>

If you use the dcecp modify -change command as shown in the previous paragraphs to change the value of a multivalued attribute, all instances of the multivalued attribute are deleted and replaced by the new values specified in the command. For example, to change only a specific value, you must enter all the values. For example, assume that the multi_name attribute has the following four values: value1, value2, value3, and value4. To change value4 to value5 you must enter the following command:

dcecp> principal modify delores -change {multi_name {value1 value2 \
value3 value5}}
dcecp>

However, you can add and remove individual values from a multivalued attribute. Use the -add option to add values. For example, assume that the multi_name attribute has values of value1, value2, value3, and value5. The following sample command adds value6 to the multi_name attribute.

dcecp> principal modify delores -add {multi_name value6}

(Use the remove option described in the following subtopic to delete specific values in a multivalued attribute.)

Note that the following command replaces all instances of the attribute named multi_name attached to the principal named delores with a single instance with a value of value1:

dcecp> principal modify delores -change {multi_name value1}
dcecp>

For example, if the multi_name attribute had the following values:

{multi_name value1 value2 value3}

then the previous command would change the values as follows:

{multi_name value1}