Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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/*

share|improve this answer
    
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? –  fga Feb 10 '12 at 12:58
    
As far I can remember, unfortunately it supports only a single datasource. –  Giovanni Toraldo Feb 14 '12 at 7:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.