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 1562025 - externalUser sudo attribute must be fully-qualified
Summary: externalUser sudo attribute must be fully-qualified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-29 12:06 UTC by Fabiano Fidêncio
Modified: 2020-05-02 18:56 UTC (History)
10 users (show)

Fixed In Version: sssd-1.16.2-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:42:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 4711 0 None None None 2020-05-02 18:55:59 UTC
Red Hat Product Errata RHSA-2018:3158 0 None None None 2018-10-30 10:43:46 UTC

Description Fabiano Fidêncio 2018-03-29 12:06:05 UTC
The externalUser support has been broken with the introduction of the fully
qualified attributes, because the provider was saving the data verbatim,
but the sudo responder expects a fully qualified name.

Reproducer:
on the server:
ipa sudocmd-add --desc='For reading log files' /usr/bin/less
ipa sudorule-add readfiles
ipa sudorule-add-user --users=lcluser
ipa sudorule-mod --hostcat=all readfiles

then on the client:
   configure sssd with:
       id_provider = files
       sudo_provider = ipa
       ipa_domain = ipa.test

    run:
       sudo useradd lcluser
       sudo passwd lcluser
       su - lcluser
       sudo -l

Comment 2 Jakub Hrozek 2018-03-29 17:00:22 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/3694

Comment 3 Jakub Hrozek 2018-04-04 12:58:14 UTC
* master: 0f6b5b02afb35caae774ff4d52854a844d49f52e

Comment 9 msiddiqu 2018-08-17 11:20:45 UTC
The steps below verifies the bug and its fix:

Reproducing on past version of sssd: 

SSSD version:
sssd-1.15.2-50.el7_4.13.x86_64

IPA version:
ipa-server-4.5.0-22.el7_4.x86_64
ipa-client-4.5.0-22.el7_4.x86_64

[root@kvm-02-guest11 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)
	
testuser is ipa user, lcluser is external user.

[root@kvm-02-guest11 ~]# ipa sudorule-show readfiles
  Rule name: readfiles
  Enabled: TRUE
  Host category: all
  Command category: all
  RunAs User category: all
  RunAs Group category: all
  Users: testuser
  External User: lcluser
  Sudo Deny Commands: /usr/bin/ls
  Sudo Option: !authenticate

[root@kvm-02-guest11 ~]# su -c 'sudo -l' testuser
Matching Defaults entries for testuser on kvm-02-guest11:
    !visiblepw, always_set_home, match_group_by_gid, env_reset, env_keep="COLORS
    DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR
    USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION
    LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER
    LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET
    XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User testuser may run the following commands on kvm-02-guest11:
    (ALL : ALL) NOPASSWD: ALL, !/usr/bin/ls

[root@kvm-02-guest11 ~]# su -c 'sudo -l' lcluser
sudo: no tty present and no askpass program specified


Reproducing on a version later the version than fixed version of sssd:

SSSD version:
sssd-1.16.2-12.el7.x86_64

IPA version:
ipa-server-4.5.4-10.el7_5.3.x86_64
ipa-client-4.5.4-10.el7_5.3.x86_64

ipa user is testuser, external user is lcluser

[root@kvm-02-guest24 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.5 (Maipo)

[root@kvm-02-guest24 ~]# ipa sudorule-show readfiles
  Rule name: readfiles
  Enabled: TRUE
  Host category: all
  Command category: all
  RunAs User category: all
  RunAs Group category: all
  Users: testuser
  External User: lcluser
  Sudo Deny Commands: /usr/bin/ls
  Sudo Option: !authenticate

[root@kvm-02-guest24 ~]# su -c 'sudo -l' testuser
Matching Defaults entries for testuser on kvm-02-guest24:
    !visiblepw, always_set_home, match_group_by_gid, env_reset, env_keep="COLORS
    DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR
    USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION
    LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER
    LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET
    XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User testuser may run the following commands on kvm-02-guest24:
    (ALL : ALL) NOPASSWD: ALL, !/usr/bin/ls

[root@kvm-02-guest24 ~]# su -c 'sudo -l' lcluser
Matching Defaults entries for lcluser on kvm-02-guest24:
    !visiblepw, always_set_home, match_group_by_gid, env_reset, env_keep="COLORS
    DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR
    USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION
    LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER
    LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET
    XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User lcluser may run the following commands on kvm-02-guest24:
    (ALL : ALL) NOPASSWD: ALL, !/usr/bin/ls

Comment 10 Nikhil Dehadrai 2018-08-17 11:35:48 UTC
Based on comment#9 , marking the status to 'VERIFIED'.

Comment 12 errata-xmlrpc 2018-10-30 10:42:26 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://access.redhat.com/errata/RHSA-2018:3158


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