Revision history for MikeShultz


Revision [3607]

Last edited on 2015-06-06 17:21:03 by MikeShultz [removed ldap scratch]
Additions:
IRC: mikeshultz
=====Working On=====
- Registry App
- LDAP dev setup
Deletions:
=====Random Notes=====
====Test LDAP Setup====
These instructions are to setup the OpenNIC object schemas in slapd. This will only work on systems that use the cn=config type of configuration(not slapd.conf). It has been tested on Debian 8.
===1) Install OpenLDAP(slapd)===
Follow documentation for your specific distribution to install slapd.
Copy the provided ##courier.schema## and ##dnsdomain2.schema## to ##/etc/ldap/schema/##. Start slapd afterwards. New object schemas should now be available but the config has to be regenerated.
==Debian==
If you are not prompted for initial configuration, you can reconfigure the package with the following command.
%%(Bash)
dpkg-reconfigure slapd
%%
**NOTE**: Initial configuration must be set with a baseDN of ##dc=opennic,dc=glue##.
===2) Test Connection and Base Schema===
If everything has been setup correctly, the following should work. You will be prompted for the administrator password.
%%(Bash)
ldapsearch -h localhost -D "cn=admin,dc=opennic,dc=glue" -W -b "dc=opennic,dc=glue" -s "base" "(objectclass=*)"
%%
===3) Create dnsschema.conf===
Create ##/tmp/dnsschema.conf## with the schemas you would like to use. As an example:

%%(text)
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/dnsdomain2.schema
%%

===4) Create Temp Config Directory===
Create a directory to create the new LDAP configuration.
%%(Bash)
mkdir /tmp/dnsschema.d
%%
===5) Generate Temporary Config===
Populate the test directory with a base config.
%%(Bash)
slaptest -f /tmp/dnsschema.conf -F /tmp/dnsschema.d/
%%
===6) Verify Config===
Check and make sure the ##/tmp/dnsschema.d/## directory has ##cn=config##, which should suggest that the config has been created successfully.
===7) Make Necessary Changes to LDIFs===
Edit the new ##dnsdomain2.ldif##(should be at ##/tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{*\}dnsdomain2.ldif##) in the temporary config. Change the first few lines so it looks something like the following:
%%(text)
dn: cn=dnsdomain2,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: dnsdomain2
%%
Edit ##courier.ldif## in a similar fashion to look something like this.
%%(text)
dn: cn=courier,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: courier
%%
For both files, remove everything below the last olcObjectClasses entry as it is superfluous and possibly conflicting.
===8) Merge New Schema===
Now, we need to merge the new object schemas into the config.
%%
ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{3\}courier.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{5\}dnsdomain2.ldif
%%
If all goes well, you should see output along the lines of:
%%(text)
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=dnsdomain2,cn=schema,cn=config"
%%
===9) Add Test Data===
%%(Bash)
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f opennic_glue.ldif
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f test_zone.ldif
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f users.ldif
%%
A complete test environment should now be setup and ready to go.


Revision [3600]

Edited on 2015-06-06 15:21:18 by MikeShultz [removed ldap scratch]
Additions:
===7) Make Necessary Changes to LDIFs===
Edit ##courier.ldif## in a similar fashion to look something like this.
dn: cn=courier,cn=schema,cn=config
cn: courier
For both files, remove everything below the last olcObjectClasses entry as it is superfluous and possibly conflicting.
Deletions:
===7) Make Necessary Changes to LDIF===
Also, remove everything below the last olcObjectClasses entry.


Revision [3599]

Edited on 2015-06-06 15:14:14 by MikeShultz [added base dn note]
Additions:
Copy the provided ##courier.schema## and ##dnsdomain2.schema## to ##/etc/ldap/schema/##. Start slapd afterwards. New object schemas should now be available but the config has to be regenerated.
**NOTE**: Initial configuration must be set with a baseDN of ##dc=opennic,dc=glue##.
Deletions:
Copy the provided ##dnsdomain2.schema## to ##/etc/ldap/schema/##. Start slapd afterwards. New object schemas should now be available.


Revision [3598]

Edited on 2015-06-06 15:12:15 by MikeShultz [bit of cleanup]
Additions:
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f users.ldif
A complete test environment should now be setup and ready to go.
Deletions:
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f users.ldif # it appears I'm missing a schema for this one... investigating.
ldapadd?
**TO BE CONTINUED...**


Revision [3597]

Edited on 2015-06-06 15:08:48 by MikeShultz [remove misc.schema and added courier.ldif]
Additions:
Now, we need to merge the new object schemas into the config.
ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{3\}courier.ldif
Deletions:
include /etc/ldap/schema/misc.schema
Now, we need to merge the new object schema into the config.


Revision [3596]

Edited on 2015-06-06 14:19:43 by MikeShultz [remove misc.schema and added courier.ldif]
Additions:
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f opennic_glue.ldif
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f test_zone.ldif
ldapadd -D "cn=admin,dc=opennic,dc=glue" -W -x -f users.ldif # it appears I'm missing a schema for this one... investigating.


Revision [3595]

Edited on 2015-06-05 01:54:54 by MikeShultz [remove misc.schema and added courier.ldif]
Additions:
===9) Add Test Data===
ldapadd?
**TO BE CONTINUED...**
Deletions:
====Alternate Test LDAP Setup====
This setup is to create a rootdn just for OpenNIC and ignoring trying to integrate it into an existing LDAP database.
===3) Apply Test Data===
asdf


Revision [3594]

Edited on 2015-06-05 01:37:54 by MikeShultz [remove misc.schema and added courier.ldif]
Additions:
===3) Create dnsschema.conf===
===4) Create Temp Config Directory===
===5) Generate Temporary Config===
===6) Verify Config===
===7) Make Necessary Changes to LDIF===
===8) Merge New Schema===
Deletions:
===1) Add Schema to Config===
Add the provided ##dnsdomain2.schema## to slapd.conf with an include line.
echo "include /etc/ldap/schema/dnsdomain2.schema" >> /tmp/fuck
===2) Create dnsschema.conf===
===3) Create Temp Config Directory===
===4) Generate Temporary Config===
===5) Verify Config===
===6) Make Necessary Changes to LDIF===
===7) Merge New Schema===


Revision [3593]

Edited on 2015-06-05 01:32:14 by MikeShultz [remove misc.schema and added courier.ldif]
Additions:
===2) Test Connection and Base Schema===
If everything has been setup correctly, the following should work. You will be prompted for the administrator password.
ldapsearch -h localhost -D "cn=admin,dc=opennic,dc=glue" -W -b "dc=opennic,dc=glue" -s "base" "(objectclass=*)"
===3) Apply Test Data===
Deletions:
===2) Apply Test Data===


Revision [3592]

Edited on 2015-06-05 01:28:03 by MikeShultz [remove misc.schema and added courier.ldif]
Additions:
===2) Apply Test Data===
Deletions:
===2) Add Schema to Install===
===3) Apply Test Data===


Revision [3591]

Edited on 2015-06-05 01:26:55 by MikeShultz [adding alternate config]
Additions:
====Alternate Test LDAP Setup====
This setup is to create a rootdn just for OpenNIC and ignoring trying to integrate it into an existing LDAP database.
===1) Install OpenLDAP(slapd)===
Follow documentation for your specific distribution to install slapd.
==Debian==
If you are not prompted for initial configuration, you can reconfigure the package with the following command.
dpkg-reconfigure slapd
===2) Add Schema to Install===
Copy the provided ##dnsdomain2.schema## to ##/etc/ldap/schema/##. Start slapd afterwards. New object schemas should now be available.
===3) Apply Test Data===
asdf


Revision [3590]

Edited on 2015-06-04 12:31:25 by MikeShultz [adding alternate config]
Deletions:
ldap_add: Other (e.g., implementation specific) error (80)
additional info: olcAttributeTypes: Duplicate attributeType: "1.3.6.1.4.1.2428.20.0.0"


Revision [3589]

Edited on 2015-06-04 12:23:40 by MikeShultz [Clearer formatting]
Additions:
===1) Add Schema to Config===
Add the provided ##dnsdomain2.schema## to slapd.conf with an include line.
echo "include /etc/ldap/schema/dnsdomain2.schema" >> /tmp/fuck
===2) Create dnsschema.conf===
Create ##/tmp/dnsschema.conf## with the schemas you would like to use. As an example:


===3) Create Temp Config Directory===
Create a directory to create the new LDAP configuration.
===4) Generate Temporary Config===
===5) Verify Config===
===6) Make Necessary Changes to LDIF===
Edit the new ##dnsdomain2.ldif##(should be at ##/tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{*\}dnsdomain2.ldif##) in the temporary config. Change the first few lines so it looks something like the following:
===7) Merge New Schema===
Deletions:
Create /tmp/dnsschema.conf with the schemas you would like to use. As an example:
Create a directory to create the new ldap configuration.
Edit the new dnsdomain2.ldif(should be at ##/tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{*\}dnsdomain2.ldif##) in the temporary config. Change the first few lines so it looks something like the following:


Revision [3588]

Edited on 2015-06-04 12:00:26 by MikeShultz [full instructions on setting up OpenNIC objects]
Additions:
These instructions are to setup the OpenNIC object schemas in slapd. This will only work on systems that use the cn=config type of configuration(not slapd.conf). It has been tested on Debian 8.
Create a directory to create the new ldap configuration.
%%(Bash)
mkdir /tmp/dnsschema.d
Populate the test directory with a base config.
%%(Bash)
slaptest -f /tmp/dnsschema.conf -F /tmp/dnsschema.d/
Check and make sure the ##/tmp/dnsschema.d/## directory has ##cn=config##, which should suggest that the config has been created successfully.
Edit the new dnsdomain2.ldif(should be at ##/tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{*\}dnsdomain2.ldif##) in the temporary config. Change the first few lines so it looks something like the following:
dn: cn=dnsdomain2,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: dnsdomain2
Also, remove everything below the last olcObjectClasses entry.
Now, we need to merge the new object schema into the config.
ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/dnsschema.d/cn\=config/cn\=schema/cn\=\{5\}dnsdomain2.ldif
If all goes well, you should see output along the lines of:
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=dnsdomain2,cn=schema,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
additional info: olcAttributeTypes: Duplicate attributeType: "1.3.6.1.4.1.2428.20.0.0"


Revision [3587]

The oldest known version of this page was created on 2015-06-04 11:44:43 by MikeShultz [full instructions on setting up OpenNIC objects]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki