Previous Topic: set trust-sasl-proxy Command

Next Topic: set unique-attrs-subtree Command—Enable Checks for Uniqueness Within a Subtree

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.

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]] [...] ;
attribute

Specifies 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 the set unique-attr-subtree command. If you have not defined the set unique-attr-subtree command, 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>;

More information:

Check for Attribute Value Uniqueness in a Subtree