Sun Directory Services 3.1 Administration Guide

Chapter 8 Configuring the Directory Schema

This chapter explains how to obtain the current schema from the directory server, and how to modify it to add object class or attribute definitions.

It also contains a list of all the object classes and attributes that belong to the default schema for Sun Directory Services 3.1 with a description of their purpose and meaning.

Schema Definition

The schema is the set of rules that describe the data that can be stored in the directory. It defines the type of entries, their structure and their syntax. The schema can be modified and extended, though certain objects and attributes cannot be changed.

The schema definition is stored in two files in the configuration directory /etc/opt/SUNWconn/ldap/current:

For the exact format of an LDAP attribute definition, refer to the dsserv.at.conf(4) man page.

Displaying the Current Schema

There are two ways of displaying the current schema:

Displaying the Schema with ldapsearch

Use the ldapsearch command with the following arguments to read the current schema through the directory server:

/opt/SUNWconn/bin/ldapsearch -h hostname -b "cn=schema" -s base 'objectclass=*'

where hostname is the name of the directory server.

Table 8-1 shows an extract of the type of information returned.

Table 8-1 Extract from the Directory Schema
objectclasses=( 2.5.6.0 NAME 'top' DESC 'Standard ObjectClass'
MUST ( objectclass ) )
objectclasses=( 2.5.6.1 NAME 'alias' DESC 'Standard ObjectClass'
SUP 'top'  MUST ( objectclass $ aliasedobjectname )  MAY ( * )  )
objectclasses=( 2.5.6.2 NAME 'country' DESC 'Standard ObjectClass'
SUP 'top'  MUST ( objectclass $ c )  MAY ( description $ searchguide
)  )
objectclasses=( 2.5.6.3 NAME 'locality' DESC 'Standard
ObjectClass' SUP 'top'  MUST ( objectclass )  MAY ( description $
l $ searchguide $ seealso $ st $ street )  )
objectclasses=( 2.5.6.4 NAME 'organization' DESC 'Standard
ObjectClass' SUP 'top'  MUST ( objectclass $ o )  MAY (
businesscategory $ description $ destinationindicator $
facsimiletelephonenumber $ internationalisdnnumber $ l $
physicaldeliveryofficename $ postofficebox $ postaladdress $
postalcode $ preferreddeliverymethod $ registeredaddress $
searchguide $ seealso $ st $ street $ telephonenumber $
teletexterminalidentifier $ telexnumber $ userpassword $
x121address )  )
objectclasses=( 2.5.6.5 NAME 'organizationalUnit' DESC 'Standard
ObjectClass' SUP 'top'  MUST ( objectclass $ ou )  MAY (
businesscategory $ description $ destinationindicator $
facsimiletelephonenumber $ internationalisdnnumber $ l $
physicaldeliveryofficename $ postofficebox $ postaladdress $
postalcode $ preferreddeliverymethod $ registeredaddress $
searchguide $ seealso $ st $ street $ telephonenumber $
teletexterminalidentifier $ telexnumber $ userpassword $
x121address )  )
objectclasses=( 2.5.6.6 NAME 'person' DESC 'Standard ObjectClass'
SUP 'top'  MUST ( objectclass $ sn $ cn )  MAY ( description $
seealso $ telephonenumber $ userpassword )  )

When you use the ldapsearch command to display the schema, the keywords are shown in capitals. They introduce the following:

Displaying the Schema in the Admin Console

  1. In the Admin Console, go to the Schema section.

    This section displays a list of object classes in hierarchical order, or in alphabetical order. Use the buttons below the pane to change the display mode.

    Click the folder icon for an object class to display its mandatory (M) and optional (O) attributes. With the hierarchical display, clicking on the folder icon of an object class will display any subclasses of that object class.

  2. To display a list of attributes, click the Attributes list button.

    An attribute list window is displayed. It contains a five-column table that shows:

    • The name of the attribute

    • Alias names for this attribute (separated by commas)

    • The attribute syntax, identified by a keyword (see "Attribute Reference")

    • A unique OID for the attribute

    • Whether the attribute is a naming attribute (that is, an attribute that can be used in the distinguished name of an entry), and whether it is single-valued

Modifying the Schema

You can modify the schema in the following ways:

It is safer to always create a new object class rather than modify an existing one. If you want to extend an existing object class, you can create an object class that inherits from the object class that you want to extend.

Deleting object classes or attributes is not advisable since there might be directory entries that use the existing definitions.

There is no automatic check that schema modifications do not invalidate entries. Therefore, to minimize the risk of entries becoming invalid, restrict your changes to the addition of object classes or attributes. You can, however, enable schema checking. For this, refer to "Schema Checking".

The schema definition contains object classes that are used internally by the Sun Directory Services directory server or by the Sun Internet Mail Server (SIMS). The Admin Console does not permit you to modify these object classes. They are marked with the keyword frozen in the configuration files. You must not remove this keyword from any standard schema item.


Note -

If you use the web gateway to allow users to browse the directory, all modification made to the schema must also be made to the dswebtmpl.conf file. See the dswebtmpl.conf(4) man page for details.


Schema Checking

Sun Directory Services provides a schema checking feature. When directory information is added or modified, the directory server checks that all mandatory attributes of the object class or inherited by the object class are present.

The schema checking options are:

Select the appropriate level of checking from the Schema check menu button in the Schema section of the Admin Console. The default level of checking is weak.


Note -

Schema checking cannot be performed on the compatibility of object classes. For example, you could create an entry with the device object class and the person object class. The IETF standards do not enforce rules on object classes.


To Create a New Object Class

  1. From the Admin Console main window, choose Class/Attribute from the Create menu.

    The Create Object Class window is displayed.

  2. Specify:

    • The name of the new object class

    • The object identifier for the object class (optional)

    • The superior object class, from which this object class will inherit attributes

  3. Specify the mandatory and optional attributes you want to include in this class:

    1. Select or create the attributes you want to include in the object class.

    2. Select the mode of the attributes (Mandatory or Optional) from the pop-up menu.

    3. Click Add to add the attributes to the object class definition.

  4. Click OK to save the modified object class definition.

    This change will take effect when you restart the dsservd daemon. Figure 8-1 shows a new object class plumber, with the atttributes you would need to contact a plumber.

    Figure 8-1 Create Object Class Window

    Graphic

To Create a New Attribute

  1. From the Admin Console main window, choose Class/Attribute from the Create menu.

    The Create Object Class window is displayed.

  2. In the Create Object Class window, choose Attribute from the Create menu.

    The Add Attribute window is displayed.

  3. Specify:

    • The name of the attribute

    • The unique OID for this attribute (optional)

    • Any alternate names in the Aliases field (optional)

    • Whether the attribute is multi-valued

    • Whether the attribute can be used as a naming attribute

  4. Click OK to save the new attribute definition.

    This change will take effect when you restart the dsservd daemon. Figure 8-2 shows a new attribute hourlyRate has been created to be added to the plumber object class.

    Figure 8-2 Create Attribute Window

    Graphic

To Add an Attribute to an Object Class

  1. In the object class list, highlight the object class to which you want to add an attribute, and choose Modify Class/Attribute from the Selected menu.

    The Modify Object Class window is displayed. The name of the object class you are modifying is displayed in the General section of this window. The mandatory and optional attributes for that object class are listed in the Object class attributes section.

  2. In the Defined Attributes list, highlight the attribute that you want to add.

  3. Select the mode of the attribute (Mandatory or Optional) from the pop-up menu.

  4. Click Add to add the attribute to the object class definition.

  5. Click OK to save the modified object class definition.

    This change will take effect when you restart the dsservd daemon.

    To change the mode of an attribute that is already included in the object class definition, select the attribute in the Class attributes list and change the mode using the Mode pop-up menu.

Object Class Reference

This section contains an alphabetical list of the object classes accepted by the default schema, except for pilot project object classes described in RFC 1274 The COSINE and Internet X.500 Schema. It explains the purpose of each object class, and gives the list of mandatory and optional attributes specific to the particular object class. An object class also inherits the mandatory and optional attributes from its superior object class. Inherited attributes are not listed.

The keyword frozen after the object class name indicates that this object class is used by a component of Sun Internet Mail Server, or by a component of Sun Directory Services. You cannot change a frozen object class definition using the Admin Console. If you change the definition of such an object class, ensure that your changes do not prevent the Sun Internet Mail Server and the Sun Directory Services components from using objects of this class.

account
alias (frozen)

Note -

It is preferable to avoid using the alias object class and use instead the aliasObject subclass. This is because the alias object class only allows the full DN of the aliased object as its naming attribute, and not just the RDN.


aliasObject

Note -

The attributes in the aliasObject entry must include the naming attribute of the entry. The naming attribute should be the same as for the aliased object.


applicationEntity
applicationProcess
automount
bootableDevice (auxiliary object class)
certificationAuthority (auxiliary object class)
certificationAuthority-V2 (auxiliary object class)
country
cRLDistributionPoint
device
dcObject (auxiliary object class)
dmd
dNSDomain
document
documentSeries
domain
domainRelatedObject
dSA
emailGroup
emailPerson (frozen)
friendlyCountry
gatewayCCMailUser (frozen)
gatewayChannel (frozen)
gatewayDocConvPreference (frozen)
gatewayLotusNotesUser (frozen)
gatewayMail11User (frozen)
gatewayMrUser (frozen)
gatewayMSMailUser (frozen)
gatewayNGMUser (frozen)
gatewayNGM70User (frozen)
gatewayPROFSUser (frozen)
groupOfNames
groupOfUniqueNames
ieee802Device (auxiliary object class)
inetOrgPerson
ipHost (auxiliary object class)
ipProtocol
ipNetwork
ipService
labeledURIObject (auxiliary object class)
locality
nas
nisMailAlias
nisMap
nisNetGroup
nisNetId
nisObject
nisSunObject
oncRpc
organization
organizationalPerson
organizationalRole
organizationalUnit
person
posixAccount (auxiliary object class)
posixGroup
referral (frozen)
remoteUser (frozen)
residentialPerson
rFC822LocalPart
room
shadowAccount (auxiliary object class)
simpleSecurityObject
strongAuthenticationUser (auxiliary object class)
subschema (auxiliary object class)
sunNisMap
sunNisServer
top
uidObject (auxiliary object class)
userSecurityInformation (auxiliary object class)

Attribute Reference

All attributes defined in the schema have one of the following syntaxes:

The following list of attributes in the default schema gives the attribute syntax, any alternative names, and explains how the attribute is used.

abstract
acctattrFile
acctAuthentic
acctDelayTime
acctInputOctet
acctInputPacket
acctOutputOctet
acctOutputPacket
acctSessionId
acctSessionTime
acctStatusType
acctTerminateCause
ackedSequenceNumber
aliasedObjectName
altServer
assistant
associatedDomain
associatedName
attributeName
attributeTypes
audio
authCalledStationId
authCallingStationId
authFilterId
authHostPortNumber
authHostPortType
authLoginService
authNASidentifier
authorityRevocationList
authorizedDomain
authorizedSubmitter
authPortLimit
authPrefixName
authReplyMessage
authServiceProtocol
authStartMenuId
authState
authStopMenuId
authType
authSuffixName
authTerminationAction
automountInformation
bootFile
bootParameter
buildingName
businessCategory
c, see countryName
carLicense
cACertificate
cCMailAddress
certificateRevocationList
channelName
channelType
chapPassword
cn, see commonName
commonName
copyright
countryName
createtimestamp
creatorsName
crossCertificatePair
currentSequenceNumber
dataSource
dc, see domainComponent
deltaRevocationList
departmentNumber
description
destinationIndicator
dictionaryFile
distinguishedName
dITContentRules
dITRedirect
dITStructureRules
dmdName
dn, see distinguishedName
dNSRecord
docConvPreference
documentAuthor
documentIdentifier
documentLocation
documentPublisher
documentStore
documentTitle
documentVersion
domainComponent
drink
dynamicIPaddressBinding
dynamicIPAddress
dynamicSessionCounter
dynamicSessionId
employeeNumber
employeeType
expandable
expirationDate
facsimileTelephoneNumber
favouriteDrink, see drink
framedCompression
framedIPAddress
framedMTU
framedProtocol
framedRoute
framedRouting
freeFormName
gecos
generationQualifier
gidNumber
givenName
grpCheckInfo
grpReplyInfo
homeDirectory
homeFacsimileTelephoneNumber
homePhone
homePostalAddress
host
idleTimeoutNumber
initials
internationalISDNNumber
ipHostNumber
ipLoginHost
ipLoginPort
ipNetmaskNumber
ipNetworkNumber
ipProtocolNumber
ipxNetworkNumber
joinable
jpegPhoto
keywords
knowledgeInformation
labeledURI
lastModifiedBy
lastModifiedTime
loginShell
ldapSyntaxes
localityName
lotusNotesAddresses
macAddress
mail
mail11Addresses
mailAutoReplyExpirationDate
mailAutoReplyMode
mailAutoReplySubject
mailAutoReplyText
mailAutoReplyTextInternal
mailDeliveryFile
mailDeliveryOption
mailFolderMap
mailForwardingAddress
mailHost
mailMessageStore
mailProgramDeliveryInfo
mailQuota
manager
matchingRules
matchingRuleUse
maxLastModifiedTime
member
memberUid
memberNisNetgroup
middleName
mobiletelephoneNumber
modifiersName
modifytimestamp
mrAddresses
mSMailAddresses
nameForms
namingContexts
nGM70Addresses
nGMAddresses
nisMapEntry
nisMapName
nisNetgroupTriple
nisNetIdGroup
nisNetIdHost
nisNetIdUser
o, see organizationName
objectClass
objectClasses
objectStatus
obsoletedByDocument
obsoletesDocument
oncRpcNumber
organizationName
owner
ownerDeliveryFile
ownerDeliveryOption
ownerProgramDeliveryInfo
pagertelephonenumber
personalMobile
personalPager
personalSignature
personalTitle
photo
physicalDeliveryOfficeName
postalAddress
postalCode
postOfficeBox
preferredCCMailOriginator
preferredCCMailRecipient
preferredDeliveryMethod
preferredLanguage
preferredLotusNotesOriginator
preferredLotusNotesRecipient
preferredMail11Originator
preferredMail11Recipient
preferredMrOriginator
preferredMrRecipient
preferredMSMailOriginator
preferredMSMailRecipient
preferredNGM70Originator
preferredNGM70Recipient
preferredNGMOriginator
preferredPROFSOriginator
preferredPROFSRecipient
preferredRfc822Recipient
presentationAddress
pROFSAddresses
radiusAuthFailedAccess
radiusLoginExpiration
radiusLoginPasswd
radiusLoginProfile
radiusPppExpiration
radiusPppPasswd
radiusPppProfile
radiusSlipExpiration
radiusSlipPasswd
radiusSlipProfile
ref
registeredAddress
reportsTo
requestsToDeliveryFile
requestsToDeliveryOption
requestsToProgramDeliveryInfo
rfc822AuthorizedSubmitter
rfc822Mailbox
rfc822MailMember
rfc822Owner
rfc822UnauthorizedSubmitter
roleOccupant
roomNumber
searchGuide
secretary
seeAlso
serialNumber
sessionTimeoutNumber
shadowLastChange
shadowExpire
shadowFlag
shadowInactive
shadowMax
shadowMin
shadowWarning
sharedKey
stateOrProvinceName
streetAddress
subject
subschemaSubentry
sunNisDbmCache
sunNisDnsForwarding
sunNisDomain
sunNisInputFile
sunNisKey
sunNisLoadMap
sunNisMapFullName
sunNisMapState
sunNisMaster
sunNisOutputName
sunNisSecurityMode
supportedAlgorithms
supportedApplicationContext
supportedControl
supportedLDAPVersion
supportedExtension
supportedSASLMechanisms
surname
telephoneNumber
teletexTerminalIdentifier
telexNumber
textEncodedORaddress
thumbNailPhoto
thumbNailLogo
title
uidNumber
unauthorizedDomain
unauthorizedSubmitter
uniqueIdentifier
uniqueMember
updatedByDocument
updatesDocument
userCallbackId
userCallbackNumber
userCertificate
userDefinedAttribute1
userDefinedAttribute2
userDefinedAttribute3
userDefinedAttribute4
userid
userPassword
userSMIMECertificate
x121Address
x500uniqueIdentifier