# ActiveLdap and windows

**URL:** <https://www.ruby-forum.com/t/activeldap-and-windows/54641>\
**Category:** Rails\
**Created:** [March 10, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641 "2006-03-10T20:53:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsmails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/838e76/32.png) [@jsmails](https://www.ruby-forum.com/u/jsmails)\
**Post date:** [March 10, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641/1 "2006-03-10T20:53:33Z")

</div>

I thought I might try to create a Rails app to use LDAP authentication.  
Unfortunately, I can’t figure out how to get the Ruby/LDAP stuff working  
in my environment (I’m using a windows server). If anyone out there has  
experience with this, could you dumb it down a little bit for me?

---

<div class="post-metadata">

**Author:** ![jsmails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/838e76/32.png) [@jsmails](https://www.ruby-forum.com/u/jsmails)\
**Post date:** [March 10, 2006, 11:54pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641/2 "2006-03-10T23:54:47Z")

</div>

ActiveLdap requires the ruby-ldap library, which, since it uses the C  
API, must be compiled. This could be tricky on a Windows machine.  
Supposedly some people have done it using Cygwin, but there’s little or  
no information out there about how.

In our organization, we decided not to mess with it on Windows machines.  
We created an ActionWebService to do the LDAP authentication on our  
Linux server and then it can be accessed from any platform. This has  
the additional advantage of keeping all our auth code (configuration,  
business logic) in one place and lets us do cross-server,  
cross-framework (to support legacy PHP code) single sign-in with browser  
fingerprinting to reduce spoofing.

If you get ruby-ldap to work on Windows, I’m sure the community would  
appreciate a step-by-step HOWTO.

jacob smails wrote:

> I thought I might try to create a Rails app to use LDAP authentication.  
> Unfortunately, I can’t figure out how to get the Ruby/LDAP stuff working  
> in my environment (I’m using a windows server). If anyone out there has  
> experience with this, could you dumb it down a little bit for me?

---

<div class="post-metadata">

**Author:** ![jsmails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/838e76/32.png) [@jsmails](https://www.ruby-forum.com/u/jsmails)\
**Post date:** [March 11, 2006, 5:39pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641/3 "2006-03-11T17:39:56Z")

</div>

I’m also looking for a way to get LDAP to work on windows. I have no  
option  
in this case to run on anything other than Windows so any help would be  
greatly appreciated.

---

<div class="post-metadata">

**Author:** ![jsmails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/838e76/32.png) [@jsmails](https://www.ruby-forum.com/u/jsmails)\
**Post date:** [March 13, 2006, 5:05pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641/4 "2006-03-13T17:05:24Z")

</div>

I’ve been thinking about doing something similar as a last resort. I  
will be  
running with IIS and I suppose that it is easy to integrate IIS with  
Active  
Directory. I’ll try and wrap up the ldap / active directory stuff in IIS  
as  
a web service and then use it from there.

But it would be so much nicer to have it all in ruby. I saw that the  
ruby  
library is supposed to be working on windows now but I can’t figure out  
how  
to build it. So if anyone has been succesfull with it please let us  
others  
know.

---

<div class="post-metadata">

**Author:** ![jsmails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/838e76/32.png) [@jsmails](https://www.ruby-forum.com/u/jsmails)\
**Post date:** [March 13, 2006, 4:32pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641/5 "2006-03-13T16:32:45Z")

</div>

Jens Norrgrann wrote:

> I’m also looking for a way to get LDAP to work on windows. I have no  
> option  
> in this case to run on anything other than Windows so any help would be  
> greatly appreciated.

I know that using LDAP with PHP is pretty easy in a Windows environment.  
I think I may follow Jason’s example and set up a web service for LDAP  
authentication using php, and then access that from my RAILS app, using  
differnt ports on the same machine. Or, I may just bag the RAILS part  
altogether and do the whole thing in PHP. I guess one advantage to the  
web service would be that it could be used for multiple apps.

---

<div class="post-metadata">

**Author:** ![jsmails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/838e76/32.png) [@jsmails](https://www.ruby-forum.com/u/jsmails)\
**Post date:** [March 13, 2006, 5:51pm UTC](https://www.ruby-forum.com/t/activeldap-and-windows/54641/6 "2006-03-13T17:51:22Z")

</div>

Has anyone tried contacting the project owner? If you _have_ to use  
Windows, it sure would be nice to have it all in Ruby. I hate to see  
PHP introduced into the mix.
