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?