I'm trying to read in a simple LDIF file to add an entry to my LDAP
server. Here is the basic routine (extraneous details omitted for
brevity and security):
$ldif = Net::LDAP::LDIF->new($tmp,"r",onerror => 'warn');
$entry = $ldif->ready_entry();
$ldap = Net::LDAP->new($LDAPSERVER);
$result=$ldap->bind("$binddn",password=>"$bindpass",version=>"3");
$result=$ldap->add($entry);
Now, everything seems to work until I get to the $ldap->add method.
From that I get various versions of the following:
objectclass: value #0 invalid per syntax at ldap.cgi
I can get that error message to change to different attributes, but
basically keeps saying the same thing. I've tried adding the following
just before the $ldap->add but it didn't help:
$entry->add('changetype'=>'add');
I've even gone through a routine to save off the value of each
attribute, do a $entry->delete on the attribute, and then a $entry->add
to re-add the attribute, to no avail.
I've done extensive searching on the web and nothing I've found has
helped, so I'm really hoping someone here can aid me ASAP, for I have to
get this done in the next day or two.
Thanks,
Rick