Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1361563

Summary: Wrong pam error code returned for password change in offline mode
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: Petr Čech <pcech>
Status: CLOSED ERRATA QA Contact: Steeve Goveas <sgoveas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: grajaiya, jhrozek, lslebodn, mkosek, mzidek, pbrezina
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.14.0-15.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 07:19:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Hrozek 2016-07-29 12:17:27 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/3109

sssd used to inform about password change in offline mode
{{{
sh$ passwd puser1
Changing password for user puser1.
System is offline, password change not possible
passwd: Authentication token manipulation error
}}}

The pam error code should be 9 and not 6

sssd.conf is minimal
{{{
    [sssd]
    services = nss, pam
    domains = LDAP

    [nss]

    [pam]

    [domain/LDAP]
    id_provider = ldap
    ldap_uri = ldaps://$SERVER
    ldap_search_base = $DS_BASE_DN
    ldap_tls_cacert = /etc/openldap/certs/cacert.asc
}}}

Redproducer:
* start sssd
* authenticate with test_user in online mode
* block access to LDAP 
* try to change password for user
  passwd test_user

Comment 2 Lukas Slebodnik 2016-08-08 12:44:40 UTC
master:
* 565e6dc434eec865c73ad1d0b61f86f5538dff01

Comment 4 Steeve Goveas 2016-09-21 11:00:49 UTC
Verified in version
sssd-1.14.0-38.el7.x86_64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: offline_misc_001: Devel TRAC Ticket 642 doesn't gracefully fail password changes in ldap offline mode
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'su_success puser1 Secret123'
:: [   PASS   ] :: Command 'su_success puser1 Secret123' (Expected 0, got 0)
spawn passwd puser1
Changing password for user puser1.
System is offline, password change not possible
passwd: Authentication token manipulation error
:: [   PASS   ] :: File '/tmp/change_offline_user_pass.out' should contain 'System is offline, password change not possible' 
:: [   PASS   ] :: File '/var/log/secure' should contain 'System is offline, password change not possible' 
'15fd4b22-c8af-4108-9fab-749bc9f84fdf'
offline-misc-001-Devel-TRAC-Ticket-642-doesn-t-gracefully-fail-password-changes-in-ldap-offline-mode result: PASS

Comment 6 errata-xmlrpc 2016-11-04 07:19:56 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, 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://rhn.redhat.com/errata/RHEA-2016-2476.html