ldap.vim searches a ldap-directory for a username. If the user is found, the script returns the full name of the user along with an e-mail address to vim.
If no match is found, the script returns the string "NF".
The script uses the following default settings that you might want to change:
- Scope: subtree
- Searchstring: "mailNickname=%s*"
- Field that contains full name: "name"
- Field that contains mail address: "mail"
Fieldnames may vary in different LDAP-implementations. Therefore, you might not get the search result you expected. The easiest way to fix this is to manually search your LDAP-directory with a tool, and then configure the script with the correct fieldnames.
If you don't have a favorite LDAP-search tool, open python and replicate the open connection and login statements from the script. Then change the search string until you get a correct result. Verify that the fields containing the full name and e-mail address are correct. If not, modify the script with the correct field names.