To copy a schema to other servers, do the following:
ldapsearch -b cn=schema -L "(objectclass=*)" > schema.ldif
attributetypes: ( myattr1-oid NAME 'myattr1' DESC 'Some piece of information.' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 EQUALITY 2.5.13.2 USAGE userApplications ) IBMAttributetypes: ( myattr1-oid DBNAME( 'myattr1' 'myattr1' ) ACCESS-CLASS normal LENGTH 500 ) attributetypes: ( myattr2-oid NAME 'myattr2' DESC 'Some piece of information.' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 EQUALITY 2.5.13.2 USAGE userApplications ) IBMAttributetypes: ( myattr2-oid DBNAME( 'myattr2' 'myattr2' ) ACCESS-CLASS normal LENGTH 500 ) objectclasses: ( myobject-oid NAME 'myobject' DESC 'Represents something.' SUP 'top' STRUCTURAL MUST ( cn ) MAY ( myattr1 $ myattr2 ) )
dn: cn=schema changetype: modify add: attributetypes ibmattributetypes attributetypes: ( myattr1-oid NAME 'myattr1' DESC 'Some piece of information.' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 EQUALITY 2.5.13.2 USAGE userApplications ) IBMAttributetypes: ( myattr1-oid DBNAME( 'myattr1' 'myattr1' ) ACCESS-CLASS normal LENGTH 500 ) dn: cn=schema changetype: modify add: attributetypes ibmattributetypes attributetypes: ( myattr2-oid NAME 'myattr2' DESC 'Some piece of information.' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 EQUALITY 2.5.13.2 USAGE userApplications ) IBMAttributetypes: ( myattr2-oid DBNAME( 'myattr2' 'myattr2' ) ACCESS-CLASS normal LENGTH 500 ) dn: cn=schema changetype: modify add: objectclasses objectclasses: ( myobject-oid NAME 'myobject' DESC 'Represents something.' SUP 'top' STRUCTURAL MUST ( cn ) MAY ( myattr1 $ myattr2 ) )
ldapmodify -D cn=administrator -w <password> -f schema.ldif