This tutorial explains how to update an attribute of all entries within a container using where clause. To run update statement first connect to the directory server (To create a new connection please see Connecting to a LDAP Server using LDAP Admin Tool) After successful connection, select the SQL button from the top menu, this will open the sql tab where you can enter the sql statements. You can also create simple sql statement from the right click context menu (Bottom tree pane).
To create a simple sql statement to update all records within a container, Select entry and from right click context menu select 'Update this record and all Children)
Ctrl+v (or paste) to paste the data to the sql window modify the attribute to update, for e.g. to update postalcode to 60660 where mail attribute not equal to 'test@test.com' and sn not equal to 'test', modify the statement to Update o=stooges set postalCode= '60660' where mail != 'test@test.com' and sn!='test' Change the maximum results to number of records expected or '0' for unlimited. Click 'Run' to run the statement. |