Hello!
I'm trying to configure unique attribue:
unique.ldiff:
dn: olcOverlay=unique,olcDatabase={1}hdb,cn=config objectClass: olcOverlayConfig objectClass: olcUniqueConfig olcOverlay: unique olcUniqueAttribute: mail
ldapadd -v -Y EXTERNAL -H ldapi:/// -f unique.ldiff ldap_initialize( ldapi:///??base ) SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 add objectClass: olcOverlayConfig olcUniqueConfig add olcOverlay: unique add olcUniqueAttribute: mail adding new entry "olcOverlay=unique,olcDatabase={1}hdb,cn=config" ldap_add: Invalid syntax (21) additional info: objectClass: value #1 invalid per syntax
What I'm doing wrong ?
Hi Jarek!
adding new entry "olcOverlay=unique,olcDatabase={1}hdb,cn=config" ldap_add: Invalid syntax (21) additional info: objectClass: value #1 invalid per syntax
What I'm doing wrong ?
I'd guess you haven't loaded the "unique" module before adding the overlay. Try adding this LDIF:
dn: cn=module,cn=config cn: module objectclass: olcModuleList objectclass: top olcmoduleload: unique olcmodulepath: /usr/lib/ldap
dn: olcOverlay=unique,olcDatabase={1}hdb,cn=config objectClass: olcOverlayConfig objectClass: olcUniqueConfig olcOverlay: {0}unique olcUniqueAttribute: mail
Hello!
Dnia 2010-10-14, czw o godzinie 16:31 -0300, Diego Lima pisze: [cut]
I'd guess you haven't loaded the "unique" module before adding the overlay. Try adding this LDIF:
Thanks for the answer. After playing a lot, I've found that it works only when both module and overlay is configured in files in /etc/ldap/slap.d/...
(I'm using slapd 2.4.23, from Debian/Sid)
For now it is enough for me, because I don't want to dynamically set uniqueness, but anyway documentation is not clear how it should be.
best regards
Hey buddy,
if you use Apache Directory Studio amongst other things for configuring overlays, it automatically gets you the right dependencies if you choose for example OC "olcUnique", you need also need to have OC "olcOverlay" and so on, ADS automatically sets it for you in a wizard like process. Doing that without that tool was really a PITA, especially if are not that familiar with the whole package of different types of classes and schema dependencies.
Give it a try, ADS made my life as LDAP-Admin a whole lot of easier.
Bye.
http://directory.apache.org/studio/index.html
PS: sounds like I am a PR agent for apache. :/
2010/10/14 Jarek jarek@poczta.srv.pl
Hello!
Dnia 2010-10-14, czw o godzinie 16:31 -0300, Diego Lima pisze: [cut]
I'd guess you haven't loaded the "unique" module before adding the overlay. Try adding this LDIF:
Thanks for the answer. After playing a lot, I've found that it works only when both module and overlay is configured in files in /etc/ldap/slap.d/...
(I'm using slapd 2.4.23, from Debian/Sid)
For now it is enough for me, because I don't want to dynamically set uniqueness, but anyway documentation is not clear how it should be.
best regards
Jarek jarek@poczta.srv.pl
On Thursday, 14 October 2010 21:23:05 Benjamin Griese wrote:
Hey buddy,
if you use Apache Directory Studio amongst other things for configuring overlays, it automatically gets you the right dependencies if you choose for example OC "olcUnique", you need also need to have OC "olcOverlay" and so on, ADS automatically sets it for you in a wizard like process. Doing that without that tool was really a PITA, especially if are not that familiar with the whole package of different types of classes and schema dependencies.
Give it a try, ADS made my life as LDAP-Admin a whole lot of easier.
Unfortunately, I don't think there is any way to know (over LDAP) whether the unique module is built-in, compiled as a module, or not compiled at all, so I don't believe ADS can help in this situation ...
[...]
After playing a lot, I've found that it works only when both module and overlay is configured in files in /etc/ldap/slap.d/...
(I'm using slapd 2.4.23, from Debian/Sid)
For now it is enough for me, because I don't want to dynamically set uniqueness, but anyway documentation is not clear how it should be.
Regards, Buchan
Buchan Milne wrote:
On Thursday, 14 October 2010 21:23:05 Benjamin Griese wrote:
Hey buddy,
if you use Apache Directory Studio amongst other things for configuring overlays, it automatically gets you the right dependencies if you choose for example OC "olcUnique", you need also need to have OC "olcOverlay" and so on, ADS automatically sets it for you in a wizard like process. Doing that without that tool was really a PITA, especially if are not that familiar with the whole package of different types of classes and schema dependencies.
Give it a try, ADS made my life as LDAP-Admin a whole lot of easier.
Unfortunately, I don't think there is any way to know (over LDAP) whether the unique module is built-in, compiled as a module, or not compiled at all, so I don't believe ADS can help in this situation ...
The Samba folks were complaining about this ambiguity a while back. Which is why we recommended that they just always issue the moduleload statements. They will be ignored/no-op'd if the module was already built in.
Likewise, the default modulepath is always compiled in, so there's no need to set it unless you're loading a custom module of your own from some other location.
openldap-technical@openldap.org