How to filter user in group
hebaoning opened this issue · 2 comments
hebaoning commented
Hi,
Not a issue, more like a question.
I want to allow users only in vpn group to connect to vpn server. How to set LDAP_FILTER.
Tried several ways, all failed, like,
(memberOf=cn=vpn,cn=groups,cn=accounts,dc=xxx,dc=xxx)
(&(uid=$$username)(memberOf=cn=vpn,cn=groups,cn=accounts,dc=xxx,dc=xxx))
The docker image tag is v1.1
wheelybird commented
You don't need to add the UID lookup as that's automatically added. So something like this should suffice:
LDAP_FILTER=(memberOf=cn=your_group,ou=groups,dc=example,dc=org)
You will need the memberOf module enabled in your LDAP directory for this to work though.
Let me know if that helps.
amyd99 commented
Thanks wheelybird. It works.
Found that the LDAP server needs BIND and password.