Novell is now a part of Micro Focus

Importing Schema Extensions

Novell Cool Solutions: Feature
By Israel Forst

Digg This - Slashdot This

Posted: 6 Dec 2002

The Dilemma
I've created some schema extensions in a test tree on my laptop, now I need to get it on to my office system, and I don't see any other way except to type them all in again by hand (which is fraught with peril). I know I've done this before, but if you could tell me why I can't import this schema LDIF file, I would appreciate it.

The Solution
I use Textpad to massage prepare the files for import:

Export your schema as such

C:\Novell\xsl>ldapsearch -h hostname -D cn=admin,o=novell -w password 
-b cn=schema -s base objectclass=*  >c:\temp\schema.txt
Open the file in textpad:

1) delete all the syntax lines i.e.

ldapSyntaxes: ( X-NDS_SYNTAX '9' )
ldapSyntaxes: ( X-NDS_SYNTAX '9' )
dn: cn=schema
objectClass: top
objectClass: subschema

2)search for "\nobjectClasses:" and replace with "\n\ndn:
cn=schema\nchangetype: modify\nadd: objectClasses\nobjectClasses:"

3) search for "\nattributeTypes:" and replace with "\n\ndn: cn=schema\nchangetype: modify\nadd: attributeTypes\nattributeTypes:"

Don't include the "" around the search or replace criteria.
Also, be sure you have use regular expressions checked.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates