Jason Vas Dias <[EMAIL PROTECTED]> writes: > Please excuse me if I am misunderstanding something (I'm an LDAP newbie) - > but is this a Net::LDAP bug: > > Supplying an extra attribute to the "dn" of a Net::LDAP::add request, > as with: > > $ldap->add( > 'cn='.$myUserObject{cn}.',uid='.${myUserObject}{uid}.',o=att.com', > $myUserObject) # FAILS > > results in an error response with an error code of 32 and an empty error > message - while removing the "cn=" portion of the DN allows the add to > succeed: > > $ldap->add( 'uid='.${myUserObject}{uid}.',o=att.com', $myUserObject) # > SUCCEEDS > > It seems to me that if the "FAILS" request contains a bad DN, Net::LDAP ought > to > detect this and report a "Bad DN" error message, as it does for other types > of bad dn .
Error code 32 is 'no such object', that is, the superior distinguished name of the new entry does not exist. For more information RFC-4511, section 4.1.9 Result Message. In your particular case you want to add an object dn: cn=some user,uid=some user,o=att.com but the superior object of this DN 'uid=some user,o=att.com' does not exist. The error is not Net::LDAP related but due to poor tree design. You should probably read http://www.openldap.org/doc/admin24/ and some basics on how to design a directory tree and directory objects. -Dieter -- Dieter Klünter | Systemberatung http://www.dpunkt.de/buecher/2104.html GPG Key ID:8EF7B6C6 53°08'09,95"N 10°08'02,42"E