I second Iñaki's suggestion; phpLDAPAdmin is probably the way to go. You could do the Base-64 encoding and decoding in Perl, if you're into that kind of thing, but I would only bother with that if you're interested, or if phpLDAPAdmin doesn't do what you need.
We presently do bulk loads of our courses from LDIF files as part of our testing and use a combination of Perl and shell scripts to process them. A good deal of it is trivial.
- Remapping or modifying attributes: I'm experimenting with the best way to store attributes for our courses and how to map them in Moodle. I can switch them around, or modify each attribute using awk or sed, after I do a dump of all objects in our Enrollments containers (e.g., ldapsearch -x -H ldap://our.server.edu:389 -D "cn=our,ou=LDAP,ou=admin" -b "ou=Enrollments,ou=Instructors,ou=Moodle" -W "cn=*" | sed //s/Spring2006/Summer2006// > export.ldif
or run an awk/Perl script to add the changetype: replace and attribute lines, and use ldapmodify to load the changes).
- We plan to do a periodic load of course registrations into our LDAP server for LDAP auto-enrollment. In order to process merely the adds, I wrote a very quick and dirty script (quick and stinky is more like it) to dump our Enrollments container, parse the resulting LDIF file, and generate a new LDIF file with the adds and deletes.
- When we need to reset the courses containers, we write scripts to do the bulk deletes ( ldapsearch -x -H ldap://our.server.edu:389 -D "cn=our,ou=LDAP,ou=admin" -b "ou=Enrollments,ou=Instructors,ou=Moodle" -W "cn=*" dn | grep "dn: " > delete.ldif ; ldapdelete -H ldap://our.server.edu:389 -D "cn=our,ou=LDAP,ou=admin" -W -f delete.ldif
As I say, these are all just examples, and none of this is rocket science.