I am currently using sssd.conf to only allow login for ldap users that are in a specific group.

I would like to do the opposite and DENY login based on group membership of a user, while allowing all other users that are NOT members of said group to login.

Is this possible? My current config that ALLOWS based on group looks like this

access provider = ldap
ldap_access_filter = (|(location=secure)(location=sysadm))

I would like to basically do something like below (location not equal to)

ldap_access_filter != (|(location=secure)(location=sysadm))

The ldap filter that will do as you describe (prevent access from users with location set to either of those values) is:

ldap_access_filter = (!(|(location=secure)(location=sysadm)))
  • If you are managing access based on group membership that is any more complex I recommend using pam_access.so and populating /etc/security/access.conf – Andy Nov 21 '14 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.