Red Hat Bugzilla – Bug 1285667
Restrict Authentication to specific LDAP group
Last modified: 2015-11-27 09:04:37 EST
Description of problem:
Cannot restrict authentication to a specific ldap group
Version-Release number of selected component (if applicable):
OpenLDAP Server : 2.3.99
nss-pam-ldapd-0.8.13-8 (on client machine)
How reproducible: ssh to a server with LDAP client configured for group authentication
Steps to Reproduce:
1. ssh to a server
2. login with ldap credentials
Authentication works for all users
Authentication should work only for the members of a specific LDAP group
Since we decided to upgrade our systems to Red Hat 7 , we found out that the pam_ldap.conf file doesn't exist anymore.
Authentication using open ldap is working but without a restriction to a specific LDAP group.
On our Red Hat 6 systems we use the following configuration (on /etc/pam_ldap.conf):
With the above configuration we can restrict access only for the specified “groupname@company” LDAP group.
Is there any way to make the same configuration on Red Hat 7 with nslcd?
This seems to be an nss-pam-ldapd bug as it is reported against it's latest NVR. Changing the component.
First, please try to use SSSD, not nss-pam-ldapd. SSSD is the recommended and preferred LDAP client. With SSSD, you would configure access_provider=simple and simple_allow_groups = system_groups.
Second, in RHEL-7, we switched from PADL's pam_ldap to nss-pam-ldapd's pam_ldap so options differ. To accomplish what you want, you should construct pam_authz_search in nslcd.conf so that it matches only those user entries that are allowed to login. Please see the description of pam_authz_search in the nslcd.conf man page.
I don't think this is a bug, just misconfiguration. Please reopen if you think pam_authz_search is not working on RHEL-7.