问题
I am trying to set up mediawiki for a team and would like to LDAP authenticate only a set of users. I am aware I could come up with a group LDAP authentication.
But is there a shortcut to filter only a set of uids to authenticate.
回答1:
The LDAP search filter you could use is:
(|(uid=a)(uid=b)(uid=c)(uid=...))
But as noted in the comments, a group is much easier and more maintainable.
However if you cannot use a group, consider using an attribute of the users, like description
, resulting in this filter:
(description=mediawiki)
来源:https://stackoverflow.com/questions/30486333/ldap-filter-multiple-uids