Overview
Bulk update works in two phases:- Search — Find all entries matching an LDAP filter
- Modify — Apply the same modification to each matched entry
F8 to open the bulk update dialog.
Bulk operations are powerful and can affect many entries at once. Always test your filter with a regular search first to verify which entries will be modified.
Bulk Update Dialog
The bulk update dialog has four fields:Operation Type
Press
F2 to cycle through available operations:- Replace — Replace all values of an attribute with a new value
- Add — Add a value to an attribute (creates if it doesn’t exist)
- Delete — Remove all values of an attribute or a specific value
Search Filter
LDAP search filter to select which entries to modify. The filter uses standard LDAP filter syntax.Examples:
(objectClass=person)— All person entries(ou=Engineering)— All entries in Engineering OU(&(objectClass=inetOrgPerson)(!(mail=*)))— All inetOrgPerson entries without an email
Enter to execute the bulk update. Press Esc to cancel.
Operation Types
- Replace
- Add
- Delete
Replace Attribute
Replaces all existing values of an attribute with a single new value.Use case: Standardize attribute values across multiple entriesExample: Set all users’ department to “Engineering”- Entries that have
ou: Sales→ou: Engineering - Entries that have
ou: Marketing→ou: Engineering - Entries without
ou→ou: Engineering(created)
Replace operations overwrite all existing values. If the attribute had multiple values, they are all removed and replaced with the single new value.
Bulk Update Process
Search phase
Loom executes a subtree search from the base DN using your filter. All matching entries are collected.The search uses the current connection’s base DN and searches all subtrees.
Modification phase
For each matched entry, Loom applies the modification operation. Operations are executed sequentially.
- Success — Entry is modified and counter incremented
- Failure — Error is logged with the entry DN and error message
Practical Examples
Example 1: Add Missing Email Addresses
Add email addresses for users who don’t have one:Example 2: Update Department
Change department for all users in a specific organizational unit:Example 3: Remove Temporary Attribute
Delete a temporary attribute from all entries:Example 4: Add Object Class
AddposixAccount object class to all person entries:
After adding
posixAccount, you’ll need to add required attributes like uidNumber, gidNumber, and homeDirectory individually or through another bulk operation.Example 5: Remove User from All Groups
Remove a specific user from all groups:LDAP Filter Syntax
Bulk operations use standard LDAP search filters:| Filter | Matches |
|---|---|
(cn=Alice) | Entries where cn equals “Alice” |
(cn=Alice*) | Entries where cn starts with “Alice” |
(cn=*Smith) | Entries where cn ends with “Smith” |
(cn=*ice*) | Entries where cn contains “ice” |
(!(mail=*)) | Entries without a mail attribute |
(&(objectClass=person)(ou=Sales)) | Person entries in Sales OU |
(|(cn=Alice)(cn=Bob)) | Entries named Alice OR Bob |
Test your filter with the regular search function (
F9) before using it in a bulk operation to verify which entries will be affected.Safety and Best Practices
Before executing bulk updates:
- Test your search filter to see which entries match
- Check if the attribute is required or single-valued in the schema
- Consider making a backup export of affected entries
- Start with a narrow filter and expand gradually
- Use read-only mode if you want to prevent accidental modifications
Read-Only Mode
Enable read-only mode in your connection profile to prevent bulk modifications:Logging
All bulk operations are logged. PressF7 to view the log panel and see:
- Which entries were modified
- Which entries failed and why
- Full error messages for troubleshooting
Error Handling
Common errors during bulk operations:| Error | Cause | Solution |
|---|---|---|
| ”Constraint violation” | Adding a required attribute is missing, or single-valued attribute has multiple values | Check schema and ensure all requirements are met |
| ”No such attribute” | Deleting an attribute that doesn’t exist | Use filter (attributeName=*) to only match entries that have the attribute |
| ”Object class violation” | Removing a required attribute | Check MUST attributes in schema viewer |
| ”Insufficient access” | Insufficient permissions | Use an account with write access |
Keybindings
| Key | Action |
|---|---|
F8 | Open bulk update dialog |
F2 | Cycle operation type (Replace/Add/Delete) |
Tab / Shift+Tab | Navigate fields |
Enter | Execute bulk update |
Esc | Cancel and close dialog |
Implementation Details
Under the hood:Bulk updates are implemented using the LDAP
modify operation. Each entry is modified individually, which means:- Operations are not atomic across all entries
- Partial success is possible (some entries succeed, others fail)
- The operation continues even if some modifications fail
- All results are reported at the end