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 886015

Summary: Issue with exit code when (probably) sssd is used
Product: Red Hat Enterprise Linux 6 Reporter: piotr.zawadzki
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED DUPLICATE QA Contact: Kaushik Banerjee <kbanerje>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3CC: grajaiya, jgalipea, pbrezina
Target Milestone: rc   
Target Release: 6.3   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-11 11:28:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description piotr.zawadzki 2012-12-11 10:21:32 UTC
Description of problem:

We use SSSD to configure authentication with Active Directory. When we run below set of commands using LOCAL account return code is 0:

[root@pl-krapdb02-q2 etc]# su - hmeuqi -c "false"
[root@pl-krapdb02-q2 etc]# echo $?
0

But when we stop SSSD and run the same set of commands the return code is 1 (CORRECT behaviour).

[root@pl-krapdb02-q2 etc]# service sssd stop
Stopping sssd:                                             [  OK  ]
[root@pl-krapdb02-q2 etc]# su - hmeuqi -c "false"
[root@pl-krapdb02-q2 etc]# echo $?
1

------------------

On the other hand, when SSSD is running but Active Directory account is used (not local like in the above example) the behavior is also correct:

[root@pl-krapdb02-q2 etc]# service sssd status
sssd (pid  14237) is running...
[root@pl-krapdb02-q2 etc]# su - pl32552 -c "false"
[root@pl-krapdb02-q2 etc]# echo $?
1

It suggests that the issue only occurs when local (not AD) account is used together with SSSD service.

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux Server release 6.3 (Santiago)
sssd-1.8.0-32.el6.x86_64

How reproducible:

[root@pl-krapdb02-q2 etc]# su - hmeuqi -c "false"
[root@pl-krapdb02-q2 etc]# echo $?
0

--------------

[root@pl-krapdb02-q2 etc]# service sssd stop
Stopping sssd:                                             [  OK  ]
[root@pl-krapdb02-q2 etc]# su - hmeuqi -c "false"
[root@pl-krapdb02-q2 etc]# echo $?
1

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:

Expected result is return code 1 instead of 0 when SSSD is used

Additional info:

Comment 2 Jakub Hrozek 2012-12-11 11:28:42 UTC

*** This bug has been marked as a duplicate of bug 878030 ***

Comment 3 Jakub Hrozek 2012-12-11 11:29:33 UTC
Hi Piotr, can you check if the workaround with using pam_localuser (see https://bugzilla.redhat.com/show_bug.cgi?id=878030#c2) works for you?