From: Chris R. <chr...@me...> - 2002-04-15 07:21:12
|
On 12/4/02 8:26 pm, SS...@wi... <SS...@wi...> wrote: > Hi, > I have the following code: > > ######################################### > #!/opt/perl/bin/perl > > use Net::LDAP qw(:all); > use Net::LDAP::Util qw(ldap_error_desc); > use Net::LDAP::LDIF; > > $ldap = Net::LDAP->new('jws-portald', port => '390', version => 3) > || die "ERROR: $@"; > $ldif = Net::LDAP::LDIF->new > ( '/d01/oracle/product/oid301/ldap/odi/data/import/ldapdata.ldif', "r" ); > $bind = $ldap->bind('orcladmin', password => 'welcome'); > > while ($entry = $ldif->read_entry) { > $r = $ldap->add($entry); > warn $entry->dn,": ",$r->error if $r->code; > } > warn "Error reading ldapdata" unless $ldif->eof; > > ############################################# > > And I got the following error message: > > CN=testportald,OU=IT,OU=NewYork605,O=Wiley: Insufficient access at > ./odidominoagent line 30, <GEN3> line 1. > > Can you please let me know where I did wrong? > Thanks for the help!! You didn't check that your bind operation worked. In fact it shouldn't have worked because the first value in the bind method has to be a distinguished name, and 'orcladmin' isn't one of those. So your bind failed, and your directory is rejecting all add operations with "Invalid access", which seems reasonable :-) Cheers, Chris |