title: Ruby LDAP search by encrypted password filter
body: <p>I'm trying to search using an encrypted password filter, but it doesn't match any thing!!
  is there a way to get match with it!!!</p>
  
  <p>here is my code:</p>
  
  <pre><code>    ldap = Net::LDAP.new :host =&gt; "----",
  :port =&gt; 389,
  :auth =&gt; {
  :method =&gt; :simple,
  :username =&gt; "----",
  :password =&gt; "----"
  }
  
  filter = Net::LDAP::Filter.eq("userPassword", "1212")
  filter2 = Net::LDAP::Filter.eq("cn", "general*")
  tree_base = "dc=----,dc=---"
  
  ldap.search(:base =&gt; tree_base, :filter =&gt; filter &amp; filter2) do |entry|
  puts "mail: #{entry.mail}"
  puts "pw: #{entry.userPassword}"
  
  end
  </code></pre>
  
  <p>it doesn't return any results but when I replace the filter of pw with another it works!!!</p>