Novell Home

Modifying a Schema Object with LDIF

Novell Cool Solutions: Feature
By Julie Powers

Digg This - Slashdot This

Posted: 13 Jan 2003
 

Editor's Note: Experimenting with your directory's schema is serious business. Make sure trial runs are performed in a lab environment that is isolated from the rest of your network.

The Problem:
I need to modify an existing object (an aux-class) in the schema.

Adding an object or adding an attribute to the schema is explained in the manual. But how do I add an existing attribute to an existing object?

Here's the attribute:

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( passcodeivr-oid NAME 'PassCodeIVR' DESC 'Standard Attribute'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{20} SINGLE-VALUE X-NDS_NAME_VALUE_ACCESS '1' )

And here's the object:

dn: cn=schema
changetype: modify
add: objectClasses
objectClasses: ( person-oid NAME 'Person' DESC 'Standard ObjectClass'
AUXILIARY MAY ( ExternID $ Logins ) X-NDS_NOT_CONTAINER '1' )

I would like to add the PassCode attribute as an optional attribute the Person object.

The Solution:
You have to add and delete the objectClass in the same transaction.

For example:
(Assumes that the 'Person' Aux class exists and the 'PassCodeIVR' attribute has already been created)

dn: cn=schema
changetype: modify
delete: objectClasses
objectClasses: ( person-oid NAME 'Person' DESC 'Standard ObjectClass'
AUXILIARY MAY ( ExternID $ Logins ) X-NDS_NOT_CONTAINER
'1' )
-
add: objectClasses
objectClasses: ( person-oid NAME 'Person' DESC 'Standard ObjectClass'
AUXILIARY MAY ( ExternID $ Logins $ PassCodeIVR ) X-NDS_NOT_CONTAINER
'1' )

Once this is done - you add the value of 'Person' to the objectClass attribute on the user object. When this is done, the ExternID, Logins and PassCodeIVR attributes will be made available to that specific user object.

You could also add the attribute using Schema manager in ConsoleOne (but you can not delete the attribute from the object class using schema manager).


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

© 2014 Novell