this is the output.
[EMAIL PROTECTED]:~$ ./ldap.pl
cn=ronan, ou=Distribution Lists, ou=Mail System, o=Queens University
Belfast, c=GB
failed to add entry:
Invalid DN syntax at ./ldap.pl line 97, <DATA> line 225.
the DN as you see above is correct.
Im binding as the Directory manager.
just cpan'ed 0.33
code follows
use Net::LDAP;
.
.
$ldap = Net::LDAP -> new($ldap_host,port=>$ldap_port)or die "$@";
$mesg = $ldap->bind(dn=>$bind_dn,password=>$bind_pw)or die "$@";
.
.
$list{'entry'} = {
'objectClass' => ["top","mjDistributionList"],
'cn' => ["ronan"],
'mj_admin_passwd' => ["ronan.admin"],
'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' => ["r.mcglue $ main"]
};
.
.
.
$result = $ldap->add(dn => $dn,$list{'entry'});
if ($result != LDAP_SUCCESS){
$result->code;
warn "failed to add entry:\n ", $result-> error; <--- this is line 97
(from above)
} else {
print "Added $rdn successfully\n";
};
can anyone suggest why this isnt working? is there anything obvious here?
thanks
Ronan