On this page we show several Examples of LDIF Schema Modifications.
This operation is unavailable if executed from the master replica of the Root partition. This is to ensure that not all servers in the tree reset at once.
Further as schema entries are typically done on attributetypes or objectClasses which are essentially muti-valued attributes, it the "delete" operation must reference the value being modified EXACTLY what exist in the schema.
dn: cn=schema changetype: modify delete: attributetypes attributeTypes: ( 1.3.6.1.4.1.16709.100.3.1.1.71 NAME 'B1ITRWaiver' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64512} X-NDS_LOWER_BOUND '1' X-NDS_NOT_SCHED_SYNC_IMMEDIATE '1' ) - add: attributetypes attributeTypes: ( 1.3.6.1.4.1.16709.100.3.1.1.68 NAME 'B1ITRWaiver' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64512} X-NDS_LOWER_BOUND '1' X-NDS_NOT_SCHED_SYNC_IMMEDIATE '1' )
One flag that has been troublesome with the recent privacy concerns is the X-NDS_PUBLIC_READ flag that was set in the default schema from Novell.
This process will work with attributes, e.g. Surname, that have been flagged SF_NONREMOVABLE.However, this flag should not be included in the LDIF file.
Even though it's omitted, the SF_NONREMOVABLE flag will be maintained.
Here's an example LDIF file that removes the X-NDS_PUBLIC_READ flag on Surname:
dn: cn=schema changetype: modify delete: attributeTypes attributeTypes: ( 2.5.4.4 NAME ( 'sn' 'surname' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} X-NDS_NAME 'Surname' X-NDS_LOWER_BOUND '1' X-NDS_PUBLIC_READ '1' ) - add: attributeTypes attributeTypes: ( 2.5.4.4 NAME ( 'sn' 'surname' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} X-NDS_NAME 'Surname' X-NDS_LOWER_BOUND '1' )
Below we show this modification, done as an LDIF import for one of our eDirectory Servers (vendorVersion: LDAP Agent for Novell eDirectory 8.8 SP3 (20216.73)):
# LDIF to remove X-NDS_PUBLIC_READ flag from mail dn: cn=schema changetype: modify delete: attributeTypes attributeTypes: ( 0.9.2342.19200300.100.1.3 NAME 'mail' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64512} X-NDS_NAME 'Internet EMail Address' X-NDS_PUBLIC_READ '1' ) - add: attributeTypes attributeTypes: ( 0.9.2342.19200300.100.1.3 NAME 'mail' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64512} X-NDS_NAME 'Internet EMail Address' ) #!RESULT OK #!CONNECTION ldap://ldap.willeke.com:389 #!DATE 2009-07-09T07:26:55.703 dn: cn=schema changetype: modify delete: attributeTypes attributeTypes: ( 0.9.2342.19200300.100.1.3 NAME 'mail' SYNTAX 1.3.6.1.4.1.146 6.115.121.1.15{64512} X-NDS_NAME 'Internet EMail Address' X-NDS_PUBLIC_READ ' 1' ) - add: attributeTypes attributeTypes: ( 0.9.2342.19200300.100.1.3 NAME 'mail' SYNTAX 1.3.6.1.4.1.146 6.115.121.1.15{64512} X-NDS_NAME 'Internet EMail Address' ) -
dn: cn=schema changetype: modify delete: attributetypes attributetypes: ( 2.16.840.1.113719.1.131.4.1.7 NAME 'myNewAttr' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8} ) - add: attributetypes attributetypes: ( 2.16.840.1.113719.1.131.4.1.7 NAME 'myNewAttr' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} ).
dn: cn=schema changetype: modify delete: objectclasses objectclasses: ( 2.16.840.1.113719.1.131.6.1.23 ) - add: objectclasses objectclasses: ( 2.16.840.1.113719.1.131.6.1.23 NAME 'myNewClass' SUP top MUST ( myNewAttrOne $ myNewAttrTwo ) MAY ( myNewAttrThree $ myNewAttrFour $ myNewAttrFive $ myNewAttrSix ) )
Any schema modification that could possibly invalidate any data is not allowed. For example, in the first example above, the upper bound was changed from 8 to 40, thus increasing the range of possible values. The bound could not be modified to a value below 8, or it could invalidate data values.
Similarly, an attribute could be changed from a single-valued attribute to a multivalued attribute, but not the reverse as there may be data with multiple values. You could change a class and make an object a container, but you cannot change a container object into a leaf object as the container may contain other objects.
LDAPModify -h myHost - myPort -D cn=admin,o=novell -w myPassword -f myLDIFFile
This will extend the NDS schema adding the attributes and classes. In addition to adding and deleting classes, classes and attributes can be deleted from the schema. However, the referential integrity rules will not allow schema entries to be deleted if data has been instantiated using any part of the schema entries to be deleted. The following is an example of an LDIF file entry that will delete a class from the schema.
dn: cn=schema changetype: modify delete: objectclasses objectclasses: ( 2.16.840.1.113719.1.131.6.1.23 NAME 'myNewClass' SUP top MUST ( myNewAttrOne $ myNewAttrTwo ) MAY ( myNewAttrThree $ myNewAttrFour $ myNewAttrFive $ myNewAttrSix ) )