[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Add an objectClass to all entry



Domenico Maimone wrote:

1)ldapsearch ----> file.ldif

2) file.ldif---> add_objectclass_for_any_entry.sh ----> file2-ldif

3) ldapmodify file2.ldif

You may have problems with ordering of attributes etc.

I recommend using perl LDAP module for this:
<http://search.cpan.org/~gbarr/perl-ldap-0.31/lib/Net/LDAP.pod>

Just export your directory to an LDIF file, then traverse it in a loop (use Net::LDAP::LDIF) outputting to an output ldif file.

Or if you're brave, you can try doing this online with Net::LDAP object.

--
Best Regards,
Aleksander Adamowski
GG#: 274614
ICQ UIN: 19780575 http://olo.ab.altkom.pl