IBM Support

Adding a custom attribute to the inetOrgPerson objectclass as a MAY attribute

Troubleshooting


Problem

This article provides an example of making a dynamic schema change to add a custom attribute to update the MAY attributes of an objectclass.

Resolving The Problem

The following is an example of how to make a dynamic schema change in which you add a custom attribute called mytest to update the MAY attributes for the objectclass, inetOrgPerson. This example assumes that attribute mytest has already been added to the schema.

1. Create an ldif file, for example, CustomAddSchema.def that contains the following information:

dn: cn=schema
changetype: modify
replace: objectclasses
objectclasses: ( 2.16.840.1.113730.3.2.2 NAME 'inetOrgPerson'
DESC 'Defines entries representing people in an organizations
enterprise network.' SUP 'organizationalPerson' Structural MAY
( audio $ businessCategory $ carLicense $ departmentNumber $
employeeNumber $ employeeType $ givenName $ homePhone $
homePostalAddress $ initials $ jpegPhoto $ labeledURI $ mail $
manager $ mobile $ pager $ photo $ preferredLanguage $
roomNumber $ secretary $ uid $ userCertificate $
userSMIMECertificate $ x500UniqueIdentifier $ mytest ) )


2. To update inetOrgPerson, issue the command:

ldapmodify -D <bindDN> -w <bindDNpassword> -b -r -f CustomAddSchema.def

Note: In this example the inetOrgPerson objectclass is being used, but it is only an example of an objectclass. When you redefine an objectclass, you might make your directory incompatible with other directories. This might be an issue if, for example, you had to use the directory to share data with another group ,for example, Customs Service. An alternative method might be to define an auxilliary class to the objectclass, in this example, inetOrgPerson and include the attributes in the auxilliary class.

[{"Product":{"code":"SSVJJU","label":"IBM Security Directory Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.2;6.0;6.1;6.2;6.3;6.3.1;6.4","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Historical Number

WI XX00763;PMR 66020 7TD 000;APAR IR50194

Product Synonym

IBM SecureWay Directory

Document Information

Modified date:
16 June 2018

UID

swg21083867