LDAP Search function

Hi ,

Can any one kind let me know the syntax of the search method/function
ins
LDAP using RUBY

I am facing issue when i use the below script, I Guess there will be
issue
in filter. I am try to search and employee email id in my company.

filter = ‘(objectclass=VENKATA EEDARA)’

  attrs = ["name","samAccountName", "cn", "mail", "department",

“manager”]

ldap_conn.bind(ldap_base_dn, ‘My Password’) do |conn|
conn.search(ldap_base1_dn, LDAP::LDAP_SCOPE_SUBTREE, filter,attrs)
do
|entry|
puts “#{entry.inspect}”
end
end
rescue Exception => e
puts ‘I am rescued.’
puts e.backtrace
puts e.backtrace.inspect
end

end