Best ldap search package


Since there are so many ldap packages there any idea which is the best
one currently ?

I just need to do simple thing. I need to find out common name (cn) by
using ldapsearch
for the ENV variable REMOTE_USER ie. user’s login name.

Any ideas and possible way to do this ?


and I dont need to authenticate just anonymous search will do

ok i found simple answer by using ruby net-ldap module

require ‘rubygems’
require ‘net/ldap’

ldap = :host => ‘your-host-name-here’,
:port => 389,
:auth => {
:method => :anonymous

login = request.env[‘REMOTE_USER’]

filter = Net::LDAP::Filter.eq( “uid”, login )
treebase = “ou=company,ou=people,o=us” :base => treebase, :filter => filter ) do |entry|
@fullname = entry[:cn]