Tuesday, August 19, 2014

OpenLDAP: Adding New Attribute to inetOrgPerson Object Class

Description: Demonstrates how to extend inetOrgPerson object class to use a custom attribute.
Prerequisites:
http://oraclestack.blogspot.com/2014/08/openldap-adding-inetorgperson-object.html
Reference:
http://www.openldap.org/doc/admin24/schema.html

1. Shutdown OpenLDAP.

2. Locate "inetorgperson.schema" file (E.g. /usr/local/etc/openldap/schema/inetorgperson.schema).

3. In the "inetorgperson.schema" file, add the following new custom attribute ensuring that the Object identifier is unique.

attributetype ( 2.16.840.1.113730.3.1.5
        NAME 'nsAccountLock'
        DESC 'RFC2798: status of account'
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

4. In the same file, modify the inetOrgPerson object class to include the new attribute as a MAY attribute.

# inetOrgPerson
# The inetOrgPerson represents people who are associated with an
# organization in some way.  It is a structural class and is derived
# from the organizationalPerson which is defined in X.521 [X521].
objectclass     ( 2.16.840.1.113730.3.2.2
    NAME 'inetOrgPerson'
        DESC 'RFC2798: Internet Organizational Person'
    SUP organizationalPerson
    STRUCTURAL
        MAY (
                audio $ businessCategory $ carLicense $ departmentNumber $
                displayName $ employeeNumber $ employeeType $ givenName $
                homePhone $ homePostalAddress $ initials $ jpegPhoto $
                labeledURI $ mail $ manager $ mobile $ o $ pager $
                photo $ roomNumber $ secretary $ uid $ userCertificate $
                x500uniqueIdentifier $ preferredLanguage $
                userSMIMECertificate $ userPKCS12 $ nsAccountLock )

No comments:

Post a Comment