title: Query Ldap for group details using net-ldap library
body: <p>I am trying to query an ldap server for details of any groups using the net-ldap library for ruby </p>
  
  <pre><code>require 'rubygems'
  require 'net/ldap'
  
  username = "user1"
  password = "pass1"
  host = 'server.address'
  ldap = Net::LDAP.new :host =&gt; host,  :port =&gt; 389
  ldap.auth username, password
  
  filter = Net::LDAP::Filter.eq("cn", "*group*")
  
  ldap.search(:base =&gt; treebase, :filter =&gt; filter, :return_result =&gt; true) do |entry|
    puts "DN: #{entry.dn}"
    entry.each do |attr, values|
      puts ".......#{attr}:"
      values.each do |value|
        puts "          #{value}"
      end
    end
  end
  </code></pre>
  
  <p>I get details about the group but not the owners of the group.</p>
  
  <p>Any idea on what is wrong ?? and how to do it</p>