set unique-attrs Command -- Enable Checks for Uniqueness of Attribute Values
The set unique-attrs command enables uniqueness checking for new attribute values. These checks only apply to attribute values in the same DSA.
cad
The
set unique-attrs
command enables uniqueness checking for new attribute values. These checks only apply to attribute values in the same DSA.You can specify the subtree that each attribute must be unique within.
This command has the following format:
set unique-attrs = attribute [subtree = DN] [,attribute [subtree = DN]] [...] ;
- attributeSpecifies an attribute that should have unique values.
- subtree =DN(Optional) Specifies the subtree that the attribute should be unique in.If you don't specify this, the attribute will be unique in the subtree specified by theset unique-attr-subtreecommand. If you have not defined theset unique-attr-subtreecommand, the attribute will be unique within the local prefix.
Example: Make Two Attributes Unique Within a Specified Subtree
The following commands specify that the values of the
uid
and cn
attributes must be unique within the Corporate subtree in Democorp: set unique-attrs-subtree = <o democorp><ou corporate>; set unique-attrs = uid, cn;
Example: Make Two Attributes Unique in Different Subtrees
In this example, the values of the
uid
and phoneNumber
attributes must be unique within the Corporate subtree. However, the values of the cn
attribute must be unique within the Staff subtree:set unique-attrs-subtree = <o democorp><ou corporate>; set unique-attrs = uid, phoneNumber, cn subtree = <o democorp><ou Sales>;