# LDAP Setup

**URL:** <https://www.ruby-forum.com/t/ldap-setup/114235>\
**Category:** Rails\
**Created:** [September 10, 2007, 10:28am UTC](https://www.ruby-forum.com/t/ldap-setup/114235 "2007-09-10T10:28:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niconoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a87d85/32.png) [@niconoe](https://www.ruby-forum.com/u/niconoe)\
**Post date:** [September 10, 2007, 10:28am UTC](https://www.ruby-forum.com/t/ldap-setup/114235/1 "2007-09-10T10:28:10Z")

</div>

Hi,

I’m developpign an intranet application using rails for my company. For  
the moment, I’m simply storing contact and companies info in my database  
using ActiveRecord, and everything works pretty well.

My users would like to have directly access to the mail adresses stored  
in that database from their mail application (thunderbird) contact’s  
list. I don’t realyy know a lot about LDAP, but I was thinking it may be  
the solution.

We could configure thunderbird to retreive addresses from that LDAP  
server, and so ask the controller of my application to create, delete or  
update entries in the LDAP directory when necessary.

Do you think this is a correct solution (in the big picture) ?  
Do you have ever do something like this ? Is it a lot of work ?  
Can I store in my contacts mysql table a reference to the LDAP entry to  
update it when necessary ? Or (as the dataset will be quite small) is it  
better/easier to use a cron task to recreate the LDAP directory every  
hour after grabbing contact info in mysql ?

Thanks in advance for all these general questions and sorry for my poor  
english,

Nicolas

---

<div class="post-metadata">

**Author:** ![niconoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a87d85/32.png) [@niconoe](https://www.ruby-forum.com/u/niconoe)\
**Post date:** [September 10, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/ldap-setup/114235/2 "2007-09-10T17:01:48Z")

</div>

What kind of LDAP server are you using? Have you decided?

I’d recommend OpenLDAP with a mysql backend. Then you can access the  
same database with your rails app, but serve the data over LDAP as well.  
Maybe there is a better way, but I’m not sure there is.

Mirroring the data from LDAP could be done via cron, but that seems  
messy. 🙂

Using OpenLDAP works for us. Google it.  
~k

On Mon, 2007-09-10 at 10:28 +0200, Nicolas N. wrote:

> Thanks in advance for all these general questions and sorry for my poor  
> english,
> 
> Nicolas  
> –  
> Kurth Bemis  
> Ozone Computer  
> Consulting, Sales and Service

1 Main Street  
Springfield, VT 05156

802-885-8030  
888-321-OZONE  
[ozonecomputer.com](http://ozonecomputer.com)

---

<div class="post-metadata">

**Author:** ![niconoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a87d85/32.png) [@niconoe](https://www.ruby-forum.com/u/niconoe)\
**Post date:** [September 11, 2007, 11:55am UTC](https://www.ruby-forum.com/t/ldap-setup/114235/3 "2007-09-11T11:55:49Z")

</div>

Hi,

You’re right, after reading some stuff and documentation, it seems the  
right method !

However, I’m new to the ldap world, and it seems a quite big and complex  
world.  
If anyone has a link to some example to something similar I want to do  
(thnuderbird asks openldap who uses a read only mysql backend), it will  
be greatly appreciated !

Thanks to everybody,

Niko

Kurth Bemis wrote:

> What kind of LDAP server are you using? Have you decided?
> 
> I’d recommend OpenLDAP with a mysql backend. Then you can access the  
> same database with your rails app, but serve the data over LDAP as well.  
> Maybe there is a better way, but I’m not sure there is.
> 
> Mirroring the data from LDAP could be done via cron, but that seems  
> messy. 🙂
> 
> Using OpenLDAP works for us. Google it.  
> ~k
> 
> On Mon, 2007-09-10 at 10:28 +0200, Nicolas N. wrote:
> 
> > Thanks in advance for all these general questions and sorry for my poor  
> > english,
> > 
> > Nicolas  
> > –  
> > Kurth Bemis  
> > Ozone Computer  
> > Consulting, Sales and Service
> 
> 1 Main Street  
> Springfield, VT 05156
> 
> 802-885-8030  
> 888-321-OZONE  
> [ozonecomputer.com](http://ozonecomputer.com)
