1

I am trying to configure and OpenLDAP server on Ubuntu 10.04 to use a mysql database as its datasource. I am following the guides about the back-sql and realize that in order to map mysql schema with ldap schme i need to use the metadata mapping tables.

ldap_oc_mappings, ldap_attr_mappings ldap_entries, ldap_entry_objclasses and ldap_referrals

However most samples indicates database and ldap server being on the same location. Is it possible to create and use the mapping tables in a different database from the datasource i want to map with OpenLDAP? (in a different host database server e.g. in the LDAP server host)

Thanks

1 Answer 1

1

OpenLDAP rely on ODBC for connecting to the MySQL, you should configure in /etc/odbc.ini something like:

[database-reference]
driver = MySQL
Database = database_name
Server = 127.0.0.1
User = username
Password = mypassword

Change the Server attribute.

As a side note: since ODBC configuration may vary on different distributions, take always a look at the documentation shipped with your OpenLDAP and odbc package available in /usr/share/doc/*

2
  • Thank you for the answer. In the config file can i reference one database containing the metadata mapping tables and one database containing my user data? Is OpenLDAP capable of retrieving data from multiple databases?
    – fgakk
    Feb 10, 2012 at 12:58
  • As far I can remember, unfortunately it supports only a single datasource. Feb 14, 2012 at 7:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .