
42 Novell eDirectory 8.8 SP7 Troubleshooting Guide
Adding an Optional Attribute to an Existing Object Class
Although adding new schema elements is an acceptable practice, modifying or extending existing
schema elements is usually dangerous. Because every schema element is uniquely identified by an
OID, when you extend a standard schema element, you effectively create a second definition for the
element even though it still uses the original OID. This can cause incompatibility problems.
There are times when it is appropriate to change schema elements. For example, you might need to
extend or modify new schema elements as you refine them during development. Instead of adding
new attributes directly to a class, you should generally use auxiliary classes only to
Add new attributes to an existing object class.
Subclass an existing object class.
5.3.3 Adding or Removing Auxiliary Classes
The following sample LDIF file creates two new attributes, creates an auxiliary class with these new
attributes, then adds an
inetOrgPerson
entry with the
auxiliary
class as an object class of the entry
and with values for the
auxiliary
class attributes.
version: 1
# Add an attribute to track a bear’s hair. The attribute is
# multi-valued, uses a case ignore string syntax,
# and has public read rights
# Values may include: long hair, short, curly, straight,
# none, black, and brown
# X-NDS_PUBLIC_READ ’1’ The 1 allows public read,
# 0 denies public read
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 2.16.840.1.113719.1.186.4.10 NAME
’bearHair’ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
X-NDS_PUBLIC_READ ’1’ )
# add an attribute to store a bear’s picture
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 2.16.840.1.113719.1.186.4.11 NAME
’bearPicture’ SYNTAX 1.3.6.1.4.1.1466.115.121.1.5
SINGLE-VALUE )
# create an Auxiliary class for the bearfeatures
dn: cn=schema
changetype: modify
add: objectclasses
objectclasses: (2.16.840.1.113719.1.186.6.101 NAME
’bearFeatures’ MAY (bearHair $ bearPicture) AUXILIARY)
# now create a user named bobby
dn: cn=bobby,o=bearcave
changetype: add
cn: bobby
sn: bear
givenName: bobby
bearHair: Short
bearHair: Brown
bearHair: Curly
bearPicture:< file:///c:/tmp/alien.jpg
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: bearFeatures
Comentarios a estos manuales