def lookup_dn(cn)
      service.search(base: tree, filter: Net::LDAP::Filter.equals('cn', cn), attributes: 'dn').first&.dn
    end
def lookup_dn(cn)
      service.search(base: tree, filter: Net::LDAP::Filter.equals('cn', cn), attributes: 'dn').first&.dn
    end
Returns the DN for the given CN attribute