LDAP::NET LDAP::NETapi
the directory is using NETapi
can someone point me to a documet(s) where the differences betwween thsse two modules are hightlighted
specifically in the writing of an entry to the directory...
I have created the entry and am attempting to write using NET::LDAP but keep getting an error
failed to add entry: Object class violation at ./e2.pl line 87
the code is as follows
$list{'entry'} = {
'objectClass' => ['top','mjDistributionList'],
'cn' => ["AUT"],
'mj_admin_passwd' => ["apassword"],
'mj_moderate' => ['TRUE'],
'owner' => [$list_owner],
'description' => ["AUT mailing list"],
'mj_approve_passwd' => ["aut.approve"],
'mj_submit_policy' => ["restricted"],
'mj_subscribe_policy' => ["closed"],
'mj_restrict_post' => [EMAIL PROTECTED],
'mj_DLMembers' => []
};
$ret = $ldap->add(dn=>$dn,attrs => [EMAIL PROTECTED]'entry'}]);
if ($ret != LDAP_SUCCESS){
$ret->code && warn "failed to add entry: ", $ret->error ;
} else {
print "Added $rdn successfully\n";
};
Is there any difference in how the two modules wrap the entry before they add to the directory??
when i use the LDAPapi module i get the following error at runtime but ive followed the
http://www.cpan.org/modules/by-module/Apache/CDONLEY/Net-LDAPapi-1.40.readme
document and can still not amke any sense of it(the error below i mean)
Net::LDAPapi::ldap_search needs ARRAY reference as argument 5. at /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/Net/LDAPapi.pm line 854, <INPUT> line 1.
Searching for uid=2129655... $
here is the source
my ($ld, $base, $uid) = @_;
my $filter = "(uid=$uid)";
my @attrs = ("primaryAlias");
print ("Searching for uid=$uid... ");
my $mesg = $ld->search($base,scope => 'sub',filter => $filter, attrs=>[EMAIL PROTECTED],0);
many thanks
ronan
as before im not on the list so could any helpful souls please reply to my email address.
