ldapinit
Convert Yahoo AB to mozilla LDIF
For use with Thunderbird and other mozilla products
Converting Yahoo exported address book LDIF to Darkstar's LDAP
Converting Yahoo exported address book LDIF to Darkstar's LDAP
- Export the yahoo address book [downloaded as Yahoo_ab.ldif ]
- open with editor
- do a regexp replace: ",mail.*" with ",o=Addressbook,dc=example,dc=com"
- delete all accurences of objectclass: country [country attribute c: is covered by mozillaAbPersonObsolete objectclass]
- delete all occurences of 'xmozillauseconferenceserver: 0'
- ensure that there are no empty "sn" fields. If they are not relevant, delete entire entry
- modify entries with duplicate names
- e.g. if there are two John Smiths, change one to be John G. Smith
- if there is a duplicate, ensure that there is only one valid entry available
- modify any non conformant telehonenumber field
- e.g. telephonenumber: 44-171-555-5555 [Name] must be ONLY telephonenumber: 44-171-555-5555 [no alpha characters]\
- delete any commas from the cn field [e.g. "FirstName, LastName" must be just "FirstName LastName"]
- also check givenname and sn attributes
Replace
objectclass: person
locality:
cellphone:
paerphone:
countryname:
::
With
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mozillaAbPersonObsolete
objectclass: country
l:
mobile:
pager:
c:
:
Use the following command to add entries:
ldapadd -c -x -D "cn=root,dc=example,dc=com" -W -f ab.ldif
Use the following command to modify entries:
ldapmodify -c -x -D "cn=root,dc=example,dc=com" -W -f ab.ldif