[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby-Net-Lap - Problems to Search

Eduardo Dias

3/13/2008 4:22:00 PM

I'm using the ruby-net-ldap to connect in the Active Directory. I'm able
to connect but for some strange reason when i try to do any search
nothing is returned.

Follow the code:


username = 'user'
password = 'password'
ldap = Net::LDAP.new(:host => 'host', :port => 389, :base =>
'dc=domainname,dc=domain')
ldap.auth(username, password)

if ldap.bind

puts "# authentication succeeded"

filter = Net::LDAP::Filter.eq('name', "steven*")
ldap.search(:base => "dc=domainname,dc=domain", :filter => filter)
{|entry|
puts "found"
}

else
puts "# authentication failed"
end

The console show "# authentication succeeded" but "found" never is
printed

Someone already had some problem like this?
--
Posted via http://www.ruby-....