From: Chris R. <chr...@me...> - 2002-02-04 13:37:15
|
Torsten Eymann <tor...@os...> wrote: > Hi, > > > I can't add DN over perl (Net::LDAP) > --- > $mesg = $ldap->add( > dn => "uid=" . $uid .",". $wohin, > attr => [ > 'objectclass' => uri_unescape($query->param('objectclass')), > ......; > > The Browser say's: > ADD Now dn:uid=TTor1,ou=Special Users,o=oz.de ''top', > 'organizationalPerson', 'inetOrgPerson', 'mailrecipient', > 'nsmessagingserveruser', 'nslicenseuser', 'oz'' failed to add entry: > Object class violation 65, Object class violation > > > > The Netscape error-log show: > [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special Users,o=oz.de) > attr (organizationalperson) not allowed [04/Feb/2002:13:52:46 +0100] - > Entry (uid=TTor1,ou=Special Users,o=oz.de) attr (mailrecipient) not > allowed [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special > Users,o=oz.de) attr (nslicenseuser) not allowed > > > Why dropped the NS-LDAP Server any objectclasses, if I use the > perl-module? What might be happening is that your uri_unescape($query->param('objectclass')) call is returning a list of objectclasses, which is turning your call into: attr => [ 'objectclass' => 'top', 'organizationalPerson' => 'inetOrgPerson', 'mailrecipient' => 'nsmessagingserveruser', ... ] Probably not what you want! Surround the call to uri_unescape with [ ]: attr => [ 'objectclass' => [ uri_unescape(...) ], ... ] Cheers, Chris |