Hello.
In order to find a pure and clean test environment to let me experiment x-ordered extension, this what I did:
I. on SuSE 10.2, install openldap2-2.3.27-25 (official suse package) II. start the service by running /etc/init.d/ldap start III. run slapadd to add the test entry given in http://www.highlandsun.com/hyc/drafts/draft-chu-ldap-xordered-xx.html
joe # ldapadd -D cn=Manager,dc=my-domain,dc=com -w secret -x dn: olcDatabase={1}bdb,dc=my-domain,dc=com olcDatabase: {1}bdb objectClass: olcDatabaseConfig olcSuffix: {0}dc=example,dc=com olcSuffix: {1}o=example.com olcSuffix: {2}o=The Example Company olcSuffix: {3}o=example,c=us
adding new entry "olcDatabase={1}bdb,dc=my-domain,dc=com" ldap_add: Invalid syntax (21) additional info: olcSuffix: value #0 invalid per syntax
So it seems not working. No clue, clean environment. Can someone hint me how to futher test?
Note:
I. /etc/openlda/slapd.conf is not modified at all to give a pure and clean test environment; default SuSE 10.2 openldap package is pre-configured to work out-of-the-box; II. The test entry is taken from Internet draft with only one modification to replace dn suffix to dc=my-domain,dc=com which is OpenSuSE openldap package's default value; III. I tried to include the attached schema file to slapd.conf but keep getting "Inconsistent duplicate attributeType" error which seems to suggest definition of olcDatabase, olcSuffic and olcDatabaseConfig are embeded in openldap source code. Above test is done without attached schema included in slapd.conf. IV. Similiar test had been done on my usual testbed which runs Gentoo Linux and openldap-2.3.37, that gave same result ("value #0 invalid per syntax"), which motivated me to do this cleaner test in simplist environment.
another similiar experiement that doesn't work:
I. Download latest alpha package openldap-2.4.4alpha, unpack it and ./configure; make depend; make; make install; II. run "/usr/local/libexec/slapd" III. add an ordered entry:
zhangweiwu@joe:~> ldapadd -D "cn=Manager,dc=my-domain,dc=com" -w secret -x dn: olcDatabase={1}bdb,dc=my-domain,dc=com olcDatabase: {1}bdb objectClass: olcDatabaseConfig olcSuffix: {0}dc=example,dc=com olcSuffix: {1}o=example.com olcSuffix: {2}o=The Example Company olcSuffix: {3}o=example,c=us
adding new entry "olcDatabase={1}bdb,dc=my-domain,dc=com" ldap_add: Invalid syntax (21) additional info: olcSuffix: value #0 invalid per syntax
I hope I can find something useful in administration guide which I am doing now.
在 2007-08-16四的 11:51 +0800,Zhang Weiwu写道:
Hello.
In order to find a pure and clean test environment to let me experiment x-ordered extension, this what I did:
I. on SuSE 10.2, install openldap2-2.3.27-25 (official suse package) II. start the service by running /etc/init.d/ldap start
III. run slapadd to add the test entry given in http://www.highlandsun.com/hyc/drafts/draft-chu-ldap-xordered-xx.html
joe # ldapadd -D cn=Manager,dc=my-domain,dc=com -w secret -x dn: olcDatabase={1}bdb,dc=my-domain,dc=com olcDatabase: {1}bdb objectClass: olcDatabaseConfig olcSuffix: {0}dc=example,dc=com olcSuffix: {1}o=example.com olcSuffix: {2}o=The Example Company olcSuffix: {3}o=example,c=us
adding new entry "olcDatabase={1}bdb,dc=my-domain,dc=com" ldap_add: Invalid syntax (21) additional info: olcSuffix: value #0 invalid per syntax
So it seems not working. No clue, clean environment. Can someone hint me how to futher test?
Note:
I. /etc/openlda/slapd.conf is not modified at all to give a pure and clean test environment; default SuSE 10.2 openldap package is pre-configured to work out-of-the-box; II. The test entry is taken from Internet draft with only one modification to replace dn suffix to dc=my-domain,dc=com which is OpenSuSE openldap package's default value;
III. I tried to include the attached schema file to slapd.conf but keep getting "Inconsistent duplicate attributeType" error which seems to suggest definition of olcDatabase, olcSuffic and olcDatabaseConfig are embeded in openldap source code. Above test is done without attached schema included in slapd.conf. IV. Similiar test had been done on my usual testbed which runs Gentoo Linux and openldap-2.3.37, that gave same result ("value #0 invalid per syntax"), which motivated me to do this cleaner test in simplist environment.
I suggest you start with something simpler, like example data. Working with configuration data may really put you into trouble, as there might be subtle side-effects that lead to apparently counter-intuitive behavior.
For example, you should start from understanding how test042 works:
cd tests/ ./run test042
look at testrun/slapd.1.conf for the configuration, and at scripts/test042-valsort for what the test actually does. Then you can start slapd with that configuration and try some simple operations: ldapsearch, ldapadd, ldapmodify and so.
I. on SuSE 10.2, install openldap2-2.3.27-25 (official suse package) II. start the service by running /etc/init.d/ldap start
III. run slapadd to add the test entry given in http://www.highlandsun.com/hyc/drafts/draft-chu-ldap-xordered-xx.html
You're not supposed to run slapadd while the server is running.
Note:
I. /etc/openlda/slapd.conf is not modified at all to give a pure and clean test environment; default SuSE 10.2 openldap package is pre-configured to work out-of-the-box;
Unless you load the valsort overlay where appropriate, you won't have the desired feature.
II. The test entry is taken from Internet draft with only one modification to replace dn suffix to dc=my-domain,dc=com which is OpenSuSE openldap package's default value;
III. I tried to include the attached schema file to slapd.conf but keep getting "Inconsistent duplicate attributeType" error which seems to suggest definition of olcDatabase, olcSuffic and olcDatabaseConfig are embeded in openldap source code.
They are, no need to infer. You are not supposed to muck with internal schema, most of all with that configuration specific.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
Thank you very much for this suggestion and actually, until today I dig into documents for some hours that I finally discovered I am experimenting with configuration data. I am not smart as a lot geeks to be able to understand (or google out) the Internet Draft is using configuration data as example.
And it's very appreciated for you to not not point out the mistake but also suggested what TFM to read (in this case The F** Meterial to test). I am not in the office to test but I'll do it later and share my experience with other new learners.
在 2007-08-17五的 17:08 +0200,Pierangelo Masarati写道:
I suggest you start with something simpler, like example data. Working with configuration data may really put you into trouble, as there might be subtle side-effects that lead to apparently counter-intuitive behavior.
For example, you should start from understanding how test042 works:
cd tests/ ./run test042
look at testrun/slapd.1.conf for the configuration, and at scripts/test042-valsort for what the test actually does. Then you can start slapd with that configuration and try some simple operations: ldapsearch, ldapadd, ldapmodify and so.
I. on SuSE 10.2, install openldap2-2.3.27-25 (official suse package) II. start the service by running /etc/init.d/ldap start
III. run slapadd to add the test entry given in http://www.highlandsun.com/hyc/drafts/draft-chu-ldap-xordered-xx.html
You're not supposed to run slapadd while the server is running.
Note:
I. /etc/openlda/slapd.conf is not modified at all to give a pure and clean test environment; default SuSE 10.2 openldap package is pre-configured to work out-of-the-box;
Unless you load the valsort overlay where appropriate, you won't have the desired feature.
II. The test entry is taken from Internet draft with only one modification to replace dn suffix to dc=my-domain,dc=com which is OpenSuSE openldap package's default value;
III. I tried to include the attached schema file to slapd.conf but keep getting "Inconsistent duplicate attributeType" error which seems to suggest definition of olcDatabase, olcSuffic and olcDatabaseConfig are embeded in openldap source code.
They are, no need to infer. You are not supposed to muck with internal schema, most of all with that configuration specific.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it
Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it
openldap-software@openldap.org