3

i am using a Apache directory studio for as my database. how i can create there my own field. because there are object class and based upon object class we can add the filed. how can we manually add any filed..

Following is my LDIF file.

dn: cn  = username ,ou=users,o=Agile-Infotech,ou=system
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: *****
sn: Doshi
description: Manager
uid: ******
userPassword:: e1NTSEF9TThWUnR3QjZrQm1jUTFjcWhUMmgwcmJqQUZCbGVnbkVHdDkzamc9P

**homeFolder : anything**  // i want to add this filed also in the user.

when i am adding in apache Ds it gives me NO SUCH ATTRIBUTE FOUND

Mitul Maheshwari
  • 2,647
  • 4
  • 24
  • 38

2 Answers2

2

The LDAP object classes and their attributes are described in schema definition files. The classes and attributes can be inherited from and extended. If you want to add a new attribute to the class organizationalPerson, then you need to extend it.

The schema files OpenLDAP ships with reside in a sub-directory schema under your OpenLDAP installation directory. Although not all files in that directory are being loaded into OpenLDAP by default. You can add your own definition files to that directory or any other directory the OpenLDAP run-user can read from.

Have a look at the OpenLDAP schema reference and this article for a quick rundown on how to extend object classes and attributes.

If you are using ApacheDS you can use the Apache Directory Studio to extend the schema via the studio or you can import OpenLDAP schema files. See the online documentation.

Ralf
  • 6,735
  • 3
  • 16
  • 32
  • you have told me about openLDAP but i m using apache Directory studio, how we can do in that @Ralf – Mitul Maheshwari Feb 15 '14 at 05:08
  • 1
    @MitulMaheshwari You should remove the OpenLDAP tag then. ApacheDS is the same principal. But you can use the DSStudio to extend your schema. Check out the [online docs](http://directory.apache.org/apacheds/basic-ug/2.3.1-adding-schema-elements.html). – Ralf Feb 15 '14 at 09:43
0

You need to create a schema project, add schema and then add attributetype.

Refer to similar attribute type in the existing schema if you have or read the OpenLDAP documentation.

Basically, your definition of custom attribute type have to mention mandatory fields like the OID, NAME, SYNTAX etc.

Ravi
  • 177
  • 1
  • 6