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 1392946 - sudo: ignore case on case insensitive domains
Summary: sudo: ignore case on case insensitive domains
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: SSSD Maintainers
QA Contact: Steeve Goveas
Marc Muehlfeld
URL:
Whiteboard:
Depends On: 1380436
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-08 14:08 UTC by Marcel Kolaja
Modified: 2020-05-02 18:33 UTC (History)
14 users (show)

Fixed In Version: sssd-1.14.0-43.el7_3.8
Doc Type: Bug Fix
Doc Text:
Due to an update in Red Hat Enterprise Linux 7.3, in a case-insensitive domain, the sudoUser attribute only matched the lowercase version of the LDAP user or group name. As a consequence, configurations using case-insensitive sudoUser attribute values failed. This update re-enables SSSD to match the sudoUser attribute regardless of case and now both lowercase and case-sensitive can be configured.
Clone Of: 1380436
Environment:
Last Closed: 2017-01-17 18:09:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 4274 0 None closed a sudorule without a sudoUser attribute fails to be processed with master 2020-11-06 16:39:01 UTC
Red Hat Product Errata RHBA-2017:0078 0 normal SHIPPED_LIVE sssd bug fix update 2017-01-17 22:51:58 UTC

Description Marcel Kolaja 2016-11-08 14:08:16 UTC
This bug has been copied from bug #1380436 and has been proposed
to be backported to 7.3 z-stream (EUS).

Comment 4 Amith 2016-11-14 16:09:06 UTC
I tested this bz on RHEL-7.3 and got following results:

With older build, sssd-1.14.0-43.el7.x86_64, 

1) add a sudo rule with a user in "small case" letters.
Result - User is able to run sudo commands.

# sudo -l -U student2
.
.
User student2 may run the following commands on this host:
    (root) /usr/bin/less
    (root) /usr/bin/more

2) add a sudo rule with a user in "Upper case" letters.
Result - User unable to run sudo commands.

# sudo -l -U STUDENT3
User student3 is not allowed to run sudo on vm-idm-005.


3) Upgrade the sssd build to sssd-1.14.0-43.el7_3.3.x86_64 and verify the existing rule where user is in "small case" letters.
Result - User is able to run sudo commands

# sudo -l -U student6
.
.
User student6 may run the following commands on this host:
    (root) ALL


4) Verify the existing sudo rule with a user in "Upper case" letters.
Result - User unable to run sudo commands

# sudo -l -U STUDENT4
User student4 is not allowed to run sudo on vm-idm-005.

5) Add a new sudo rule with a user in "small case" letters.
Result - User unable to run sudo commands

# sudo -l -U student5
User student5 is not allowed to run sudo on vm-idm-005.

With the patched sssd build both the upper & lower case user names should work, however in this case only the existing rules are working that too, lower case one's.

Comment 5 Jakub Hrozek 2016-11-14 22:29:32 UTC
The patch introduced a new bug tracked as https://fedorahosted.org/sssd/ticket/3241

Thank you for your testing.

Comment 7 Jakub Hrozek 2016-11-23 10:28:31 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/3241

Comment 8 Jakub Hrozek 2016-11-23 10:36:43 UTC
Additional patches:
    master: 7e23edbaa7a6bbd0b461d5792535896b6a77928b
    sssd-1-14: 54f176066dafafdc12f6e0dd112ff6339308aa7c

Comment 10 Amith 2017-01-08 17:24:17 UTC
Verified the bug on SSSD Version: sssd-1.14.0-43.el7_3.11.x86_64

Steps followed during verification:
1. Add sudo rules in AD, allowing users to run commands. Also, assign the sudoUser attribute values in Upper case and lower case. For example:

dn: CN=rule2,OU=sudoers,DC=black,DC=com
objectClass: top
objectClass: sudoRole
.
.
sudoCommand: /usr/bin/more
sudoUser: STUDENT3
sudoHost: ALL
.
.
sudoUser: student2
sudoHost: /usr/bin/more
.
.
sudoUser: STUDENT7
sudoHost: ALL

2. Setup sssd client and execute sudo cmds as users in exact case names, lower case names and upper case names.

Sample sssd.conf:

[sssd]
domains = black.com
config_file_version = 2
services = nss, pam, sudo

[domain/black.com]
ad_domain = black.com
krb5_realm = BLACK.COM
realmd_tags = manages-system joined-with-samba 
cache_credentials = True
id_provider = ad
krb5_store_password_if_offline = True
default_shell = /bin/bash
ldap_id_mapping = True
use_fully_qualified_names = True
fallback_homedir = /home/%u@%d
access_provider = ad

[root@qe-blade-04 sssd]# sudo -l -U student2
Matching Defaults entries for student2 on this host:
    !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR 
.
.
User student2 may run the following commands on this host:
    (root) /usr/bin/less
    (root) /usr/bin/more
    (root) /usr/bin/less

[root@qe-blade-04 sssd]# sudo -l -U STUDENT7
.
.
User student7 may run the following commands on this host:
    (root) ALL

[root@qe-blade-04 sssd]# sudo -l -U student7
Matching Defaults entries for student7 on this host:
.
.
User student7 may run the following commands on this host:
    (root) ALL

Comment 12 errata-xmlrpc 2017-01-17 18:09:45 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/RHBA-2017-0078.html


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