Hello,
I want to be sure that the value in the employeeNumber attribute is unique. Is there a way to tell openldap to check this or to create a unique index as in relational databases ?
Thanks Andreas
Andreas Moroder disse:
Hello,
I want to be sure that the value in the employeeNumber attribute is unique. Is there a way to tell openldap to check this or to create a unique index as in relational databases ?
Thanks Andreas
man slapo-unique
It's distributed in recent openldap versions.
Ing. Luca Scamoni Responsabile Ricerca e Sviluppo
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it ----------------------------------- Office: +39 0382 573859 (137) Mobile: +39 347 1014425 Email: luca.scamoni@sys-net.it -----------------------------------
Andreas Moroder wrote:
Hello,
I want to be sure that the value in the employeeNumber attribute is unique. Is there a way to tell openldap to check this or to create a unique index as in relational databases ?
Thanks Andreas
Something like...
overlay unique unique_base "ou=data,dc=SUFFIX" unique_attributes employeeNumber #unique_ignore objectClass ou o dc
...and...
man slapo-unique
The last line unique_ignore objectClass ou o dc is not mandatory, but I've seen a line along those lines in many examples on the net. Leave it out if you don't understand its meaning...
//Kari
Kari Mattsson wrote:
overlay unique unique_base "ou=data,dc=SUFFIX" unique_attributes employeeNumber #unique_ignore objectClass ou o dc
...and...
man slapo-unique
The last line unique_ignore objectClass ou o dc is not mandatory, but I've seen a line along those lines in many examples on the net. Leave it out if you don't understand its meaning...
Do *you* understand its meaning? Did you notice that your "unique_ignore" line is only a comment, and serves no purpose at all?
As the manpage states, you generally only need one of "unique_attributes" or "unique_ignore". In this case, just leave out the unique_ignore.
openldap-software@openldap.org