From: Francis Cianfrocca Date: 2006-08-17T23:20:49+09:00 Subject: Re: LDAP searches don't stop On 8/17/06, Bart Braem wrote: > Hello, > > I'm trying to figure out how to search an LDAP server. I can connect and I > see searches pass by if I sniff on the network interface. But the search > command never stops, even tough I limit it to 1 second. (Can I limit the > search to 1 result?) > > irb(main):001:0> require 'ldap' > => true > irb(main):002:0> conn = LDAP::Conn.new("someldapserver", 389) > => # > irb(main):003:0> conn.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION, 3) > => # > irb(main):004:0> conn.bind("ldapusername", "ldappassword") > => # > irb(main):005:0> conn.search2("dc=somedc", > LDAP::LDAP_SCOPE_SUBTREE, "somefilter", nil,false, 1) > > This keeps running forever instead of for 1 second... > Any ideas on how to solve that? I see a right result coming over the network > interface so the program can stop! > > Regards, > Bart > > What happens if you use ldapsearch against this server? What happens if you use Net::LDAP?