Monday, 27 October 2008

This one is better: ruby-net-ldap

After posting a quick how-to about Ruby-LDAP, I received a couple of very helpful comments that pointed me towards ruby-net-ldap. This is a pure Ruby LDAP library that is stable and has good documentation to help you along. It is the best Ruby LDAP gem out there and I've been through almost all of them to get to this point.

Here is a simple search for an organizational unit with the name "marketing"...

Check out the rest of the documentation for pretty good examples. This is the library I recommend. In my situation, I'm using ruby-net-ldap to import data in to, manipulate and query data in an OpenDS LDAP server.

I have a need to search in AD by DN attribute. For some reason this search comes with zero results (empty array). I can successfully search by any other attributes but not DN. I am puzzled as to why this would be the case and wonder if anyone has an explanation. I am currently using a workaround where I use multiple filters to search for all params that makeup the DN but I would prefer to just search for DN or at least understand why this is not posible. Thanks!

Search This Blog

Follow by Email

About Me

I am a nomad. I travel a lot for work and for fun. For the last 20 years, I have been building big web applications that business wants and users like to use. I've worked for federal gov, large media organisations, banks and a couple of startups in the areas of mobile technology and vision tracking. I was at ThoughtWorks for a while being agile and having fun as a polyglot programmer. Then I was a Developer Premier Field Engineer at Microsoft where I was the Asia Pacific ASP.NET MVC Lead, an agile software development coach and a languages and integration specialist.
For a while, I was playing in .gov.au as an Architect building Voice Authentication for Aussie citizens. My further adventures see me delivering more large systems for gov.au. Now I'm living in Seattle and working for a large book store. I love cats, cocktails and cooking. People are more important than things. Ideas drive the world.
I do not speak for my employer. All opinions are my own.