12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Enabling LDAP 269LISTING 12.3Continuedobjectclass ( 2.5.6.7 NAME ‘inetOrgPerson’DESC ‘RFC2256: an organizational person’SUP person STRUCTURALMAY ( title $ x121Address $ registeredAddress $ destinationIndicator $preferredDeliveryMethod $ telexNumber $ teletexTerminalIdentifier $telephoneNumber $ internationaliSDNNumber $facsimileTelephoneNumber $ street $ postOfficeBox $ postalCode $postalAddress $ physicalDeliveryOfficeName $ ou $ st $ l ) )12Attributes for an object class can be required or optional. The attributes listed within theparentheses after the MUST keyword are required. The attributes listed within the parenthesesafter the MAY keyword are optional. In Listing 12.3, the sn (surname) and cn (commonname) attributes are required for both the person and inetOrgPerson object classes. Tofind a brief description for each attribute listed, look for its attributetype definition suchas the one for sn in Listing 12.4, which is found in core.schema.LISTING 12.4Attribute Type Definition for the sn Attributeattributetype ( 2.5.4.4 NAME ( ‘sn’ ‘surname’ )DESC ‘RFC2256: last (family) name(s) for which the entity is known by’SUP name )Entries are added to a directory using a file formatted in the LDIF (LDAP Data InterchangeFormat) style, which is demonstrated in Listing 12.5. Lines beginning with a # characterare comments.LISTING 12.5LDIF Styledn: : : : Each entry in the LDIF file starts with a DN, which is a unique value for the entry used toidentify it such as a person’s name. Each entry in the file is separated by one or moreblank lines. The value of an attribute can be specified as UTF-8 text, base64 encoded data,a URL of the location of the value, or the file location of the value with file:/// at thebeginning of the full path to the file.For example, Listing 12.6 shows an example LDIF file to create an employee directory. Ituses the organizationalUnit object class to define the purpose of the directory, anemployee directory. It uses the organizationalRole object class to define the departmentswithin the company and the inetOrgPerson object class to add entries for each employeewithin each department.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!