with a simple bash script you can do that

step 1) search ldap directory and extract the pair (dn,oldattr) (where dn is something like that "dn: uid=user,ou=people,dc(o)=domain,dc(c)=net" and oldattr is something like that "attribute: value"

step 2) foreach pair you run and ldapmodify -f file .... where file is something like that

dn: uid=user,ou=people,dc(o)=domain,dc(c)=net
changetype: modify
replace: oldattr
-
add: newattr
newattr: value
-

man ldapsearch + man ldapmodify



On 12/4/06, Anant S Athavale <asa@isac.gov.in> wrote:
Dear List:

I use openldap 2.2.13 on RHEL and having 4000+ entries.

I have the following requirement.

1. Add one attribute for all the records.
2. Set a value to it, which is already set for another attribute of
the same record.

A SQL command of the following type would have done this job, if my
data was in SQL.

update data
set newattr=oldattr;

Is there any equivalent Openldap command, which can be used to do this.

Regards,

Anant Athavale.