From: Jonathon P. <jpa...@ho...> - 2002-09-30 06:48:04
|
On Fri, 27 Sep 2002 15:53, Chris Ridd wrote: > On 27/9/02 3:03 am, Jonathon Padfield <jpa...@ho...> wrote: > > The error given is: > > Failed to add entry: addRequest.addRequest.objectName is undefined at > > /usr/lib/perl5/site_perl/5.6.1/Net/LDAP/Message.pm line 163 > > > It may not be the cause of your problem, but 'Unknown' is not a legal value > for telephoneNumber, mobile, or facsimileTelephoneNumber, and if your > server is following the standards it should reject attempts to set these > values. It accepted 'Unknown' without complaint. That was using the default openldap schema files as come with Redhat 7.3. I'm simply not including such attributes anymore, which also works, but better. > I see you're setting an attribute called 'dn'. That's not the way you > specify the DN of an entry in standard servers - you need to specify the DN > of an entry when you add it, ie the first argument to the $ldap->add() > method. The arguments to pass to add ought to be documented in the man > page. Thank you, that was the problem :) My error was in going from an ldif to a hash, I assumed it was a straight conversion. Could I also suggest adding a line in the Net::LDAP::Entry manpage that explicity sets the dn after creating an object and before doing an update in the given example code. I don't know if you could do an update otherwise. -Jon |