Bug 1285667 - Restrict Authentication to specific LDAP group
Restrict Authentication to specific LDAP group
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss-pam-ldapd (Show other bugs)
7.1
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Jakub Hrozek
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-26 03:36 EST by Sokratis
Modified: 2015-11-27 09:04 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-27 09:04:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sokratis 2015-11-26 03:36:03 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


Actual results:

Authentication works for all users

Expected results:

Authentication should work only for the members of a specific LDAP group


Additional info:


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):

pam_groupdn             cn=groupname@company,ou=groups,ou=Company,dc=staff,dc=company
pam_member_attribute    memberUid
nss_base_group          ou=system_groups,ou=Company,dc=staff,dc=company?one


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?
Comment 1 Matus Honek 2015-11-27 08:59:18 EST
This seems to be an nss-pam-ldapd bug as it is reported against it's latest NVR. Changing the component.
Comment 2 Jakub Hrozek 2015-11-27 09:04:37 EST
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.

Note You need to log in before you can comment on or make changes to this bug.