Hi,

what am I doing wrong here?
When trying to add a new entry in an OpenLDAP directory using
more than one objectclass, I always get an error.

Example:
...
$hLDAP{ "objectClass" } = [ "person", "inetorgPerson" ];
...

$ret_val = $oLDAP->add(
  dn => $sDN,
  attr => [ %hLDAP ],
);
...

gives:

LDAP_INVALID_SYNTAX:
Some part of the request contained an invalid syntax. It could be a search
with an invalid filter or a request to modify the schema and the given
schema has a bad syntax.

Setting LDAP debug to 2, I get "objectclass: value #0 invalid per syntax"

Changing

$hLDAP{ "objectClass" } = [ "person", "inetorgPerson" ];

to

$hLDAP{ "objectClass" } = "inetorgPerson";

works perfectly, though.

Any idea?

TIA.
Bye.
Michael.

Reply via email to