Search code examples
c#ldapnovell

Changing objectclass in ldap


I'm creating users in a ldap (Alcatel Omnivista using Oracle Directory Services Enterprise Edition 11.1.1.5) using Novell.Directory.Ldap library.

It's been working for years but since the latest update of the Omnivista, the admins are encoutering a problem with the user I create : the objectclass are in a wrong order.

Where it should be

objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetorgperson
objectclass: CDPerson

it is :

objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
objectclass: CDPerson

and therefore their managing apps is working all wrong.

I'm using the following init code :

LdapAttributeSet attributeSet = new LdapAttributeSet
{
    new LdapAttribute("objectclass", "inetOrgPerson"),
    new LdapAttribute("cn", new[] {cg.Cn, cg.Cn}),
    new LdapAttribute("sn", cg.Sn)
};

My questions are :

  • Is it a real problem ? Is the order important ? Implying a bug in the admin application.
  • Can I alter the objectclass at creation ? Afterwards ? Should I ?
  • Or is it configuration related in the ldap ?

Thanks a lot !!


Solution

  • I managed to alter the objectclass at creation time and now the application is working nicely. Nonetheless I think the application is faulty at some point.

    Reference code if anyone needs it some day:

    LdapAttributeSet attributeSet = new LdapAttributeSet
    {
         new LdapAttribute("objectclass", new[] {"top", "person", "organizationalPerson", "inetorgperson", "CDPerson"}),
         new LdapAttribute("cn", new[] {cg.Cn, cg.Cn}),
         new LdapAttribute("sn", cg.Sn),
    };