Sun Java System Directory Server Enterprise Edition 6.0 Administration Guide

ProcedureTo Create an Object Class

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. Prepare your object class definition according to the syntax specified in RFC 4517.

  2. Use the ldapmodify(1) command to add your object class definition.

    Notice that Directory Server adds X-ORIGIN 'user defined' to the definition that you provide.


Example 11–4 Creating an Object Class

The following example adds a new object class using the ldapmodify command:


$ cat blogger.ldif 
dn: cn=schema
changetype: modify
add: objectClasses
objectClasses: ( 1.2.3.4.5.6.8 
 NAME 'blogger' 
 DESC 'Someone who has a blog' 
 SUP inetOrgPerson 
 STRUCTURAL 
 MAY blog )

$ ldapmodify -D cn=admin,cn=Administrators,cn=config -w - -f blogger.ldif
Enter bind password: 
modifying entry cn=schema

$

In a production environment, you would provide a valid, unique OID, not 1.2.3.4.5.6.8.