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:
-
NAME introduces the name of the object class.
-
DESC introduces a description of the object class.
-
SUP introduces the name of the superior object class.
-
MUST introduces the list of mandatory attributes for an object class. In dsserv.oc.conf mandatory attributes are identified by the keyword requires.
-
MAY introduces the list of optional attributes for an object class. In dsserv.oc.conf mandatory attributes are identified by the keyword allows.