diff --git a/directory/converting-schema.txt b/directory/converting-schema.txt deleted file mode 100644 index db3ed0c4..00000000 --- a/directory/converting-schema.txt +++ /dev/null @@ -1,29 +0,0 @@ -Schema Conversion ------------------ - -This is how you convert domesday.schema (in ASN.1 format) to domesday-schema.ldif (in LDIF format) for importation into slapd. - -You don't need to do this as part of a normal installation; you only need to -do it if you change the schema. - -Create a temp directory: - - mkdir /tmp/ldif_output - -Convert the schema (yes, schema_convert.conf needs those other schema in it as well as the one you are converting) - slaptest -f schema_convert.conf -F /tmp/ldif_output - -Make the following changes to "/tmp/ldif_output/cn=config/cn=schema/cn={NNNN}domesday.ldif": - - 1) change dn to: - dn: cn=domesday,cn=schema,cn=config - 2) remove bits matching {\d+} - 3) remove the last few lines (from structuralObjectClass on down) - -Add it to the directory: - - sudo ldapadd -Y EXTERNAL -H ldapi:/// -f "/tmp/ldif_output/cn=config/cn=schema/cn={NNNN}domesday.ldif" - - -Useful URL: -http://www.zarafa.com/wiki/index.php/OpenLdap:_Switch_to_dynamic_config_backend_%28cn%3Dconfig%29#Convert_schema_files_for_import diff --git a/directory/domesday-schema.ldif b/directory/domesday-schema.ldif deleted file mode 100644 index 6432b2b1..00000000 --- a/directory/domesday-schema.ldif +++ /dev/null @@ -1,15 +0,0 @@ -dn: cn=domesday,cn=schema,cn=config -objectClass: olcSchemaConfig -cn: domesday -olcAttributeTypes: ( 1.3.6.1.3.18840.1 NAME 'domesdayNickName' SUP name SIN - GLE-VALUE ) -olcAttributeTypes: ( 1.3.6.1.3.18840.2 NAME 'domesdayStartYear' EQUALITY ca - seIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.12 - 1.1.15{5} SINGLE-VALUE ) -olcAttributeTypes: ( 1.3.6.1.3.18840.3 NAME 'domesdayTShirtSize' EQUALITY c - aseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.1 - 21.1.15{6} SINGLE-VALUE ) -olcObjectClasses: ( 1.3.6.1.3.21131.1 NAME 'domesdayPerson' DESC 'Additiona - l attributes for Domesday user' SUP top AUXILIARY MAY ( domesdayNickName $ la - beledURI $ friendlyCountryName $ telephoneNumber $ domesdayStartYear $ domesd - ayTShirtSize ) ) diff --git a/directory/domesday.schema b/directory/domesday.schema deleted file mode 100644 index 17818f12..00000000 --- a/directory/domesday.schema +++ /dev/null @@ -1,26 +0,0 @@ -# Schema for additional Domesday attributes -# OIDs currently used are from experimental arc 1.3.6.1.3.x -# (see http://tools.ietf.org/html/draft-ietf-ldapbis-iana-06) -# and two runs of 'rand'. - -attributetype ( 1.3.6.1.3.18840.1 NAME 'domesdayNickName' - SUP name - SINGLE-VALUE ) - -attributetype ( 1.3.6.1.3.18840.2 NAME 'domesdayStartYear' - EQUALITY caseIgnoreMatch - SUBSTR caseIgnoreSubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{5} - SINGLE-VALUE ) - -attributetype ( 1.3.6.1.3.18840.3 NAME 'domesdayTShirtSize' - EQUALITY caseIgnoreMatch - SUBSTR caseIgnoreSubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{6} - SINGLE-VALUE ) - -objectclass ( 1.3.6.1.3.21131.1 NAME 'domesdayPerson' - DESC 'Additional attributes for Domesday user' - SUP top AUXILIARY - MAY ( domesdayNickName $ labeledURI $ friendlyCountryName $ - telephoneNumber $ domesdayStartYear $ domesdayTShirtSize ) ) diff --git a/directory/localtest/README b/directory/localtest/README index 653fac33..ebcc748d 100644 --- a/directory/localtest/README +++ b/directory/localtest/README @@ -3,7 +3,7 @@ Running a local LDAP test server for development purposes This should be done as a normal user - NOT root. -Copy the setup.ajf file to a file of your own (e.g. setup). +Copy the setup.sh-dist file to a file of your own (e.g. setup.sh). Edit it and make sure that the PATH that it builds will contain a consistent set of LDAP tools. Many distros spread these around in three places, often something like: @@ -18,7 +18,7 @@ e.g.: Now, whenever you need this test environment, you do: cd .../localtest - . setup + . setup.sh You can then use commands like: @@ -39,6 +39,11 @@ containing the 'vars' and 'slapd.conf' files as they pick up config using relative paths. This does allow you to set up several different test environments very easily. +The test server listens on port 1389 so if you want to access it with normal +command-line tools you need to do something like this: + +ldapsearch -x -H ldap://:1389/ -b dc=mozillians,dc=org '(uid=gerv)' + Andrew Findlay 20 June 2011 diff --git a/directory/localtest/bin/x-start-ldap b/directory/localtest/bin/x-start-ldap index cfd3e627..98eaf104 100755 --- a/directory/localtest/bin/x-start-ldap +++ b/directory/localtest/bin/x-start-ldap @@ -6,11 +6,6 @@ PROG=`basename "$0"` -if test ! -f slapd.conf -a -f openldap/slapd.conf -then - cd openldap -fi - if test ! -f slapd.conf then echo "$PROG: must be run from the directory containing slapd.conf" 1>&2 diff --git a/directory/localtest/build b/directory/localtest/build index e595025f..7f72cb47 100755 --- a/directory/localtest/build +++ b/directory/localtest/build @@ -1,5 +1,5 @@ # build the test server and load test data x-load-ldif -a ../mozillians-structure.ldif -x-load-ldif -a ../mozillians-data.ldif +x-load-ldif -a ../mozillians-sample-data.ldif x-load-ldif -a ../mozillians-bulk-test-data.ldif diff --git a/directory/localtest/slapd.conf b/directory/localtest/slapd.conf index a29844b3..5a698086 100644 --- a/directory/localtest/slapd.conf +++ b/directory/localtest/slapd.conf @@ -12,6 +12,14 @@ loglevel stats stats2 +# If your OpenLDAP server was built with modules then you may need to +# explicitly load some of them, e.g.: +# +# modulepath /usr/lib/openldap/modules +# moduleload back_hdb.la +# moduleload slapo_ppolicy.la +# moduleload slapo_unique.la + # Schema definitions # include schema/core.schema diff --git a/directory/mozillians-data.ldif b/directory/mozillians-sample-data.ldif similarity index 100% rename from directory/mozillians-data.ldif rename to directory/mozillians-sample-data.ldif diff --git a/directory/schema_convert.conf b/directory/schema_convert.conf deleted file mode 100644 index c0ee9965..00000000 --- a/directory/schema_convert.conf +++ /dev/null @@ -1,3 +0,0 @@ -include /etc/ldap/schema/core.schema -include /etc/ldap/schema/cosine.schema -include domesday.schema \ No newline at end of file