Skip to content

AD Custom RDN Attr

September 1, 2008

To create custom RDN attribute (By default we have only attributes like CN,OU )

you need to attributes in schema definition file one is :

rDNattID: my-custom-attr

possSuperiors: organizationalUnit
possSuperiors: another-object-class-name

(Parent object class names are needed to be mentioned here…)

i.e All objectclass that can have this custom attribute would need to specifiy in their schema definition these two attributes. Another point is that you cannot create a OU under a CN entry. CN is the leaf entry and can only have another CN under it. So you can have a CN under OU but not other way round.

To force immediate update of schema after upload add the entry:

dn:
changetype: modify
replace: schemaupdatenow
schemaupdatenow: 1

dn: CN=xxx,CN=Schema,CN=Configuration,DC=ZZZ
changetype: add
objectClass: top
objectClass: classSchema
subClassOf: top
adminDescription:
cn: XXXX
lDAPDisplayName: XXXX
governsID: 1.1.1.1.32343.32.1
mustContain:
mayContain:
possSuperiors: organizationalUnit
possSuperiors: usr
rDNattID: my-custom-RDN-Attr
###[<<for entry using this objectclass>>]

To update the objectclass

dn: CN=zzz,CN=Schema,CN=Configuration,DC=x
changetype: modify
add: mayContain
mayContain:  curr
mayContain:  prev

To Import/ Export
ldifde -i -k -v -f <file_path>
i – turn on import mode
f – file name
k – import to ignore errors and go on.
v – verbose on

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: