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 1737888 - Libwbclient alternatives manual setting lost
Summary: Libwbclient alternatives manual setting lost
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: Denis Karpelevich
URL:
Whiteboard:
Depends On:
Blocks: 1785134
TreeView+ depends on / blocked
 
Reported: 2019-08-06 10:52 UTC by Davide Principi
Modified: 2020-09-29 20:19 UTC (History)
6 users (show)

Fixed In Version: samba-4.10.13-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1785134 (view as bug list)
Environment:
Last Closed: 2020-09-29 20:19:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github NethServer dev issues 5801 0 None closed Samba shares unaccessible after Samba updates 2021-01-20 10:57:43 UTC
Red Hat Product Errata RHSA-2020:3981 0 None None None 2020-09-29 20:19:46 UTC

Description Davide Principi 2019-08-06 10:52:45 UTC
Description of problem:

A samba package upgrade causes the manual setting of libwbclient alternatives to be lost. The winbind daemon loads the wrong sssd-libwbclient library and access to samba shares does not work any more (NT_STATUS_LOGON_FAILURE).

Version-Release number of selected component:

- samba-4.8.3-6.el7_6
- chkconfig-1.7.4-1.el7.x86_64 (provides alternatives command)


How reproducible:

Always reproducible on CentOS 7.6, with the following steps.

Steps to Reproduce:

1. install an old version of samba: 

    yum install samba-4.8.3-4.el7

2. install a libwbclient alternative: 

    yum install sssd-libwbclient

3. set libwbclient "manual": 

    alternatives --set libwbclient.so.0.14-64 /usr/lib64/samba/wbclient/libwbclient.so.0.14

4. install latest samba packages: 

    yum update samba-4.8.3-6.el7_6

Actual results:

[root@vm6 ~]# alternatives --list
libnssckbi.so.x86_64	auto	/usr/lib64/pkcs11/p11-kit-trust.so
ld	auto	/usr/bin/ld.bfd
mta	auto	/usr/sbin/sendmail.postfix
libwbclient.so.0.14-64	auto	/usr/lib64/sssd/modules/libwbclient.so.0.14.0


Expected results:

[root@vm6 ~]# alternatives --list
libnssckbi.so.x86_64	auto	/usr/lib64/pkcs11/p11-kit-trust.so
ld	auto	/usr/bin/ld.bfd
mta	auto	/usr/sbin/sendmail.postfix
libwbclient.so.0.14-64	manual	/usr/lib64/samba/wbclient/libwbclient.so.0.14



Additional info:

Originally reported here: https://community.nethserver.org/t/after-yum-upgrade-shares-no-more-accessible/13131

Comment 3 Stephen Quinney 2019-10-24 09:52:24 UTC
We are seeing exactly the same problem on large numbers of machines (~100s) so this is definitely a common problem. Running the /usr/sbin/update-alternatives command from the posttrans script for the libwbclient package manually fixes the alternatives symlinks.

Comment 4 Sumit Bose 2019-10-24 10:52:42 UTC
Hi,

it looks like 'alternatives --remove' is called unconditionally during %preun in the spec file. This means that during updates the alternatives configuration for Samba's libwbclient is first removed and then added again which will trigger the auto mechanism of the alternatives tool. I would suggest to wrap the alternatives call in '%preun' with 'if [ $1 -eq 0 ]; then ... fi' so that 'alternatives --remove' is only called if the package is really uninstalled (see e.g. https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/ for the different values of $1). Please note that since always '%preun' from the old package is used this will not be fixed with the next update but only with the next but one update.

As a workaround, since it is not used, you can remove the sssd-libwbclient package. Then Samba's libwbclient will be the only alternative.

bye,
Sumit

Comment 9 errata-xmlrpc 2020-09-29 20:19:06 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, bug fix, and enhancement 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:3981


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