RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1853272 - The 'require_membership_of' documentation in pam_winbind manpage is incorrect [rhel-7.9.z]
Summary: The 'require_membership_of' documentation in pam_winbind manpage is incorrect...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.8
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: sssd-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-02 10:20 UTC by Akshay Sakure
Modified: 2023-10-06 20:57 UTC (History)
7 users (show)

Fixed In Version: samba-4.10.16-8.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 11:18:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Samba Project 14358 0 None None None 2020-07-17 10:20:32 UTC

Description Akshay Sakure 2020-07-02 10:20:12 UTC
Description of problem:
After upgrading to samba-4.10.4-11.el7_8 the parameter 'require_membership_of' no longer works for DOMAIN\groupname or DOMAIN\username, ONLY SID value works.


Version-Release number of selected component (if applicable):
---
samba-client-libs-4.10.4-11.el7_8.x86_64                    Mon Jun 15 11:52:50 2020
samba-common-4.10.4-11.el7_8.noarch                         Mon Jun 15 11:52:48 2020
samba-common-libs-4.10.4-11.el7_8.x86_64                    Mon Jun 15 11:52:50 2020
samba-common-tools-4.10.4-11.el7_8.x86_64                   Mon Jun 15 11:52:51 2020
samba-libs-4.10.4-11.el7_8.x86_64                           Mon Jun 15 11:52:50 2020
samba-winbind-4.10.4-11.el7_8.x86_64                        Mon Jun 15 11:52:51 2020
samba-winbind-clients-4.10.4-11.el7_8.x86_64                Mon Jun 15 11:52:52 2020
samba-winbind-modules-4.10.4-11.el7_8.x86_64                Mon Jun 15 11:52:51 2020
---


How reproducible:
Always


Steps to Reproduce:
1. Upgrade samba packages to latest version -> 4.10.4-11.el7_8

2. Make use of parameter 'require_membership_of' either in /etc/pam.d/password-auth file with pam_winbind.so module or in /etc/security/pam_winbind.conf file:
---
require_membership_of = DOMAIN\groupname
---

3. Try to login as AD user belonging to mentioned group and it fails with an error:
---
pam_winbind(sshd:auth): could not lookup name: groupname
pam_winbind(sshd:auth): cannot convert group groupname to sid, check if group groupname is valid group.
---


Actual results:
AD user login fails with an error:
---
pam_winbind(sshd:auth): could not lookup name: groupname
pam_winbind(sshd:auth): cannot convert group groupname to sid, check if group groupname is valid group.
---


Expected results:
Members of group mentioned in 'require_membership_of' should be able to login.


Additional info:

ONLY SID works but DOMAIN\groupname or DOMAIN\username doesn't work. 

Ideally, this should work as per the pam_winbind.conf/pam_winbind man-page and BZ https://bugzilla.redhat.com/show_bug.cgi?id=1828924
Earlier version of samba used to work with even short username/groupnames.

Comment 4 Andreas Schneider 2020-07-08 10:49:37 UTC
We will update the pam_winbind.conf manpage with:


       require_membership_of=[SID or NAME]

           If this option is set, pam_winbind will only succeed if the user is a member of the given
           SID or NAME. A SID can be either a group-SID, an alias-SID or even an user-SID. It is also
           possible to give a NAME instead of the SID. That name must have the form: MYDOMAIN\mygroup
           or MYDOMAIN\myuser (where '\' character corresponds to the value of 'winbind separator'
           parameter).. pam_winbind will, in that case, lookup the SID internally. Note that NAME may
           not contain any spaces. It is thus recommended to only use SIDs. You can verify the list
           of SIDs a user is a member of with 'wbinfo --user-sids=SID'.

Comment 11 Andreas Schneider 2020-09-10 11:24:29 UTC
We should fix the documentation of the manpages for pam_winbind(8) and pam_winbind.conf(5) for 'require_membership_of' that customer are able to configure their systems correctly and avoid more support cases because of incorrect manpages.

Comment 19 errata-xmlrpc 2020-12-15 11:18:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: samba security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5439


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