diff --git a/ldap.go b/ldap.go index 7952566..d49f79b 100644 --- a/ldap.go +++ b/ldap.go @@ -98,7 +98,7 @@ func internalLdapSearch(conLdap *MyLdap, searchReq *ldap.SearchRequest, attempt func searchByCn(myldap *MyLdap, baseDn, cn, class, attributes string) (*ldap.SearchResult, error) { var filter string if false == strings.EqualFold(cn, "ALL") { - filter = fmt.Sprintf("(cn=%s)", cn) + filter = fmt.Sprintf("cn=%s", cn) } else { filter = cn }