From: Reid Wightman Date: 2007-05-02T04:50:31+09:00 Subject: ActiveLdap questions ------=_Part_22422_24769383.1178049029435 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All - I have some silly questions about ActiveLdap. I'm a pretty new Ruby programmer, so I may be doing foolish things... I am trying to connect to and search for records on my ldap server. I have installed activeldap using gem. My test ruby program looks like this: :: require 'rubygems' require 'log4r' require 'active_ldap' class Entry < ActiveLdap::Base ldap_mapping :dn_attribute=>"cn" end ActiveLdap::Base.establish_connection( :host => "ldap-server.domain", :port => 389, :bind_dn => "ou=A,ou=B,ou=c,ou=D,o=E,c=US" ) entry = Entry.find("krwightm") :: When I run this, I get: /var/lib/gems/1.8/gems/ruby-activeldap-0.8.1/lib/active_ldap/base.rb:531:in `find_one': Couldn't find Device with DN=krwightm (cn=krwightm) (ActiveLdap::EntryNotFound) If I perform the same query with the command-line tool ldapsearch: ldapsearch -x -LLL -h ldap-server.domain -p 389 -b "ou=A,ou=B,ou=C,ou=D,o=E,c=US" "(cn=krwightm)" I find exactly one entry with cn=krwightm in my ldap. Am I doing everything correctl in my rubyprogram? From the docs and usage available I think so, but again I don't know Ruby so well :). Is there a way to verify that my bind succeeds? Even changing the last line of my program to be: entry = Entry.find("*") returns the error. Thanks much for any guidance, Reid ------=_Part_22422_24769383.1178049029435--