From: <CZa...@wi...> - 2002-03-27 15:45:59
|
I am now getting this error message. As far as I know i have (read,write,search,compare) access. Could is there any other access necessary for the modify to take place? Error Message: Insufficient access at ldif_modify.pl line 21, <GEN1> chunk 1. Graham Barr <gbarr@pobox.c To: CZa...@wi... om> cc: per...@li... Subject: Re: LDIF Modify errors 03/27/2002 10:20 AM You cannot just pass the entry to modify, you need to call update as a method on the entry. This is because the LDIF entry can be more than just a modify command. So change it to $r = $entry->update( $ldap ); Graham. On Tue, Mar 26, 2002 at 03:08:02PM -0500, CZa...@wi... wrote: > Hello, can anyone help with the LDIF class. > > I'm am reading a ldif file and trying to place the contents into a DB, but > I am getting errors and the modify updates are not > being applied to the LDAP service. > > > ERROR Message: > modifytimestamp attribute has duplicate value. VALUE: at ldif_modify.pl > line 20, <GEN1> chunk 1. > > CODE: > #!/usr/bin/perl -w > > use Net::LDAP qw(:all); > use Net::LDAP::Util qw(ldap_error_desc); > use Net::LDAP::LDIF; > > > $ldap = Net::LDAP->new('server.xyz.com', port => '389') || die > "ERROR: $@"; > $ldif = Net::LDAP::LDIF->new("out.ldif", "r") || die "$@"; > > > while ( $entry = $ldif->read_entry ) { > > $r = $ldap->modify( $entry ); > if ($r->code) { > warn $entry->dn,"; ",$r->error; > } else { > printf "%s\n",ldap_error_desc($r->code); > } > } > |