Ihr Spezialist für komplexe IT-Systeme
 

Ok, our next job is, to extend the AD schema with Oracle specific classes. I tried to perform that with Oracles Net Configuration Assistant (netca) without luck (tried netca in 9iR2 as well as in 10g). So I used commandline tools to get the work done.

I made changes to the LDIF files supplied by Oracle, so copy the following files to a private work directory:

  • $ORACLE_HOME/ldap/schema/ad/adSchemaCreateBase.sbs
  • $ORACLE_HOME/ldap/schema/ad/adSchemaCreateNet.sbs
  • $ORACLE_HOME/ldap/schema/ad/adSchemaCreateRDBMS.sbs
  • $ORACLE_HOME/ldap/schema/ad/adContextCreateCommon.sbs

I prepared the changes to these files as an patch [ ora-ad-sbs.patch ]:

diff -ur ad-orig/adContextCreateCommon.sbs ad-mypatch/adContextCreateCommon.sbs
--- ad-orig/adContextCreateCommon.sbs	Mon Nov 22 19:10:22 2004
+++ ad-mypatch/adContextCreateCommon.sbs	Mon Nov 22 19:25:22 2004
@@ -24,6 +24,7 @@
 dn: %s_OracleContextDN%
 changetype: add
 cn: OracleContext
+orclVersion: 90000
 objectclass: top
 objectclass: orclContext
 
diff -ur ad-orig/adSchemaCreateBase.sbs ad-mypatch/adSchemaCreateBase.sbs
--- ad-orig/adSchemaCreateBase.sbs	Mon Nov 22 19:10:03 2004
+++ ad-mypatch/adSchemaCreateBase.sbs	Mon Nov 22 19:25:34 2004
@@ -93,9 +93,12 @@
 subClassOf: 2.5.6.0
 mustContain: 2.5.4.3
 mayContain: 2.16.840.1.113894.7.1.1
+possSuperiors: 2.16.840.1.113894.7.2.3
 possSuperiors: 2.5.6.4
 possSuperiors: 2.5.6.5
 possSuperiors: 1.2.840.113556.1.5.67
+possSuperiors: 1.2.840.113556.1.3.23
+possSuperiors: 1.2.840.113556.1.5.12
 showinadvancedviewonly: FALSE
 adminDescription: Oracle Context
 Description: Oracle Context
@@ -190,3 +193,9 @@
 objectclass: orclContainer
 cn: OracleSchemaVersion
 
+dn: cn=BASE,cn=OracleSchemaVersion,cn=configuration,%s_AdDomainDN%
+changetype: add
+objectclass: orclSchemaVersion
+cn: BASE
+orclProductVersion: 90000
+
diff -ur ad-orig/adSchemaCreateNet.sbs ad-mypatch/adSchemaCreateNet.sbs
--- ad-orig/adSchemaCreateNet.sbs	Mon Nov 22 19:10:09 2004
+++ ad-mypatch/adSchemaCreateNet.sbs	Mon Nov 22 19:22:52 2004
@@ -371,5 +371,5 @@
 changetype: add
 objectclass: orclSchemaVersion
 cn: NET
-orclProductVersion: 81600
+orclProductVersion: 90000
 
diff -ur ad-orig/adSchemaCreateRDBMS.sbs ad-mypatch/adSchemaCreateRDBMS.sbs
--- ad-orig/adSchemaCreateRDBMS.sbs	Mon Nov 22 19:10:14 2004
+++ ad-mypatch/adSchemaCreateRDBMS.sbs	Mon Nov 22 19:22:32 2004
@@ -235,5 +235,5 @@
 changetype: add
 objectclass: orclSchemaVersion
 cn: RDBMS
-orclProductVersion: 81600
+orclProductVersion: 90000

To apply this patch you use the patch command as follows:

[frank@s0002 patch-test]$ patch -p1 < ora-ad-sbs.patch
patching file adContextCreateCommon.sbs
patching file adSchemaCreateBase.sbs
patching file adSchemaCreateNet.sbs
patching file adSchemaCreateRDBMS.sbs
[frank@s0002 patch-test]$

When you look into the files, you notice that they include a lot of tags which have to get replaced by proper values for your setup. I used the following mapping for the replacement:

After replacing the tags, it is time to load the schema into AD. I used Oracles ldapadd command for that job:

[frank@s0002 patch-test]$ $ORACLE_HOME/bin/ldapadd \
  -h 192.168.1.90 \ 
  -p 389 \ 
  -D cn=Administrator,cn=users,dc=fm-berger,dc=de \ 
  -w foobar \ 
  -f adSchemaCreateBase.sbs

You have to replace the italic sections of that command with your own values. Run that command to load the LDIF-files in the following order:

  • adSchemaCreateBase.sbs
  • adSchemaCreateNet.sbs
  • adSchemaCreateRDBMS.sbs
  • adContextCreateCommon.sbs

I am always getting an error loading the last file. It fails to create the OracleDefaultDomain node. That seems to be some AD specific problem. If you try to create that node after waiting a few seconds it works just fine...