Ruby-Net-Lap - Problems to Search

E

Eduardo Dias

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ruby-net-ldap paged search control 0
ruby net ldap bind issue 1
net ldap problem? 1
net::ldap - add_attribute 5
Please help 1
Ruby-net-ldap fail 11
LDAP Authentication with Username 1
Simple LDAP query 4

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top