openldap: Attribute Uniqueness Overlay

http://www.symas.com/blog/?page_id=80

Attribute Uniqueness Overlay

It is sometimes necessary to enforce unique values for one or more attributes in a directory; the employee ID number is an excellent example of this requirement.

The Solution

It is sometimes necessary to enforce unique values for one or more attributes in a directory; the employee ID number is an excellent example of this requirement.

By default, the attribute uniqueness overlay will enforce uniqueness across all non-operational attributes in the request; the overlay can be configured to ignore certain attributes or to enforce uniqueness only upon specific attributes. If no Base DN is specified, the overlay will use the suffix of the database onto which it has been configured.

Typical Configuration

modulepath /opt/symas/lib/openldap
moduleload back_hdb.la
moduleload unique.la

database hdb
cachesize 10000
suffix “dc=symas,dc=com”

rootdn “cn=Manager,dc=symas,dc=com”
rootpw Secret

index default eq
index objectClass,dc,o,ou
index member,owner,seeAlso
index uid,employeeNumber

overlay unique
unique_base “ou=People,dc=symas,dc=com”
unique_attributes uid employeeNumber

Note that this configuration only enforces uniqueness within the subtree “ou=People,dc=symas,dc=com”. By default, the attribute uniqueness overlay will enforce uniqueness across the entire directory. Also note that indexing the unique attributes “eq” is also highly recommended.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值