From: Chris R. <chr...@me...> - 2002-03-27 10:53:03
|
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); > } > } > > It is probably an error in your LDIF file, so it would probably help if you could send the offending entry in your LDIF file. Note that the modifyTimestamp attribute is only permitted using the standard schema to contain one value (makes sense) and it is not modifiable by users. Cheers, Chris |