Websitetemplate.org

Welcome > LDAP > Adding Attributes to Schema

Adding Attributes to Schema

With Oracle Directory Server and Red Hat Directory Server/389DS), attributes can be added to the schema and then an auxiliary class created to allow all object classess access to the attributes.

Add attributes:

$ ldapmodify -h localhost -p 389 -D "cn=Directory Manager" -w secret -f new-attr.ldif 
Contents of new-attr.ldif:
dn: cn=schema 
changetype: modify 
add: attributetypes attributeTypes: ( 1.3.6.1.4.1.100.200.1.250 NAME 'appAuthZDescription' DESC 'APP Entitlement description and AuthZ mechanism' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'user defined' ) 
-
add: attributetypes attributeTypes: ( 1.3.6.1.4.1.100.200.1.248 NAME 'appOwner' DESC 'APP Owner' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'user defined' ) 

Add auxilary object class:

$ ldapmodify -h localhost -p 389 -D "cn=Directory Manager" -w secret -f new-obj.ldif 

Contents of new-obj.ldif

dn: cn=schema
changetype: modify 
add: objectclasses objectClasses: ( 1.3.6.1.4.1.100.200.2.5 NAME 'appAccount' DESC 'Application custom account' SUP top AUXILIARY MAY ( appOwner $ appAuthZDescription $ employeeNumber )) 

Note: Ensure your OID is correct for your comany.

Content Copyright 2003-2014 George Toft