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 1123929 - "su: incorrect password" for user access denial on rhel6
Summary: "su: incorrect password" for user access denial on rhel6
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: coreutils
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-28 16:25 UTC by Kaushik Banerjee
Modified: 2014-08-04 13:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-29 12:09:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kaushik Banerjee 2014-07-28 16:25:26 UTC
Description of problem:
In the access control tests when access is denied we got "su: Permission denied" on RHEL7.0. But, there is a difference in su output on rhel6.6 and rhel7.0

/var/log/secure always shows "Access denied"


Version-Release number of selected component (if applicable):
# rpm -qf /bin/su
coreutils-8.4-37.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. sssd as the client authenticating with users from AD Server
2. Setup access control in sssd.conf
3. Try to auth as denied user

Actual results:
On RHEL6.6:

# su --shell /bin/sh nobody
sh-4.1$ su user2_dom1
Password:
su: incorrect password
sh-4.1$


On RHEL7.0:

# su --shell /bin/sh nobody
sh-4.2$ su user1_dom2
Password:
su: Permission denied
sh-4.2$


Expected results:
"su: Permission denied" on RHEL6.6

Additional info:

Comment 2 Ondrej Vasik 2014-07-29 12:09:03 UTC
If you take a closer look, you will see RHEL 7 su is from util-linux package and on RHEL 6 it is from coreutils. I don't think you can expect the consistency in such small details like message format. In my opinion, this is not a bug, we should not change such messages within major release, as it would break customer scripts checking for "incorrect password" string.

Please provide more information why this change is required if you want this bugzilla reopened.

Comment 3 Kaushik Banerjee 2014-08-01 06:43:10 UTC
My team has automation scripts which tests for user access denials. I was looking to have consistency between rhel6 and 7.

This is not really a blocker for me as I can fix my scripts to make it work on all OSes.

But, I logged this bug because it seemed "su: incorrect password" is wrongfully returned when password was correct but access was denied.

Comment 4 Ondrej Vasik 2014-08-04 13:50:13 UTC
Permission denied probably comes from PAM. Incorrect password comes from su. Different code, different handling - same functionality in most cases. Tests have to be written to deal with both possibilities, otherwise, they are fragile. We can't change this in su.c (btw. differences: util-linux (2.22.2) su.c : 689 lines of code, coreutils (8.4) su.c: 943 lines of code - diff shows: 395 lines added, 649 lines removed - so pretty much complete rewrite.)


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