[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap filter question



Hello,

I have made some tests with the filter option and had this rule that working


access to dn.subtree="dc=mycompany,dc=org" filter=(!(|(o=Company2)(o=Company3)))
        by dn="uid=user1,ou=people,dc=mycompany,dc=org" read
        by * break

Users from Company 1 and 4 are displayed



But this rule is not exactly what I need. I wrote a negative condition and I would like this condition to be positive.
I tried this rule:

access to dn.subtree="dc=mycompany,dc=org" filter=(|(o=Company1)(o=Company4))
        by dn="uid=user1,ou=people,dc=mycompany,dc=org" read
        by * break

The ldap search query returns no entry whereas I expected it to return the list of users Companies 1 and 4
# ldapsearch -x -W -D uid=user1,ou=people,dc=mycompany,dc=org -b "ou=people,dc=mycompany,dc=org"



Does someone have an idea about what's wrong with my rule ?