From: <CZa...@wi...> - 2002-03-27 15:02:42
|
Here is the LDIF file I'm using ...... dn: CN=John Smith,OU=IT,OU=NewYork605,O=Wiley changetype: modify replace: telephonenumber telephonenumber: 28792 replace: title title: Adminr - Unix Systems/Sr replace: ou ou: Info-Tech E Commerce ou: IT replace: l l: 4th Floor replace: departmentnumber departmentnumber: 9945 replace: manager manager: Smith, Brian Chris Ridd <chris.ridd@messagingd To: CZa...@wi..., per...@li... irect.com> cc: Subject: Re: LDIF Modify errors 03/27/2002 05:52 AM 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 |