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 871208 - ipa sudorule-add-user should accept external users
Summary: ipa sudorule-add-user should accept external users
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-29 22:33 UTC by Scott Poore
Modified: 2021-10-25 18:33 UTC (History)
19 users (show)

Fixed In Version: ipa-4.9.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:47:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure freeipa issue 3226 0 None None None 2021-01-19 10:47:13 UTC
Red Hat Issue Tracker FREEIPA-7169 0 None None None 2021-10-25 18:33:54 UTC
Red Hat Issue Tracker RHELPLAN-18303 0 None None None 2021-10-25 18:33:53 UTC

Description Scott Poore 2012-10-29 22:33:01 UTC
Description of problem:

ipa sudorule-add-user restricts users names to a limited variety of characters.  At the very least @ and \ should be included to cover username conventions used for AD trusted users.  When I try now, I see this:

[root@rhel6-1 failure1]#  ipa sudorule-add-user testrule --users=adtestuser1
ipa: ERROR: invalid 'user': may only include letters, numbers, _, -, . and $

In addition Simo mentioned in an email:

We should allow any character in this case.
These are external user/group names, we do not have any control on them.

If I want to add the user ätest@foo^^bar in /etc/passwd then I should be
allowed to use it in a sudo rule

Version-Release number of selected component (if applicable):
ipa-server-3.0.0-106.20121026T1837zgitf14dd98.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.  Setup IPA Master
2.  ipa sudorule-add testrule
3.  ipa sudorule-add-user --users=test
  
Actual results:
error listed above

Expected results:
success

Additional info:

Comment 2 Dmitri Pal 2012-10-29 23:27:36 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3226

Comment 3 Scott Poore 2012-10-30 14:53:10 UTC
After Sumit brought up a good point, I'm modifying this request.

Instead of modifying --users option functionality, I'd like to request a new --external (or similar) option.  This will allow a distinction between adding IPA users and External ones coming from other sources like AD.

I'd think we'd keep the option similar to the group-add one used when adding AD groups/users to a group in IPA.

Comment 7 Petr Vobornik 2017-02-23 15:12:45 UTC
The bugzilla doesn't have high enough priority in comparison to other bugs/RFEs for 7.4. Moving to next release. Without sufficient justification it can be moved again later.

Comment 22 Alexander Bokovoy 2021-01-27 09:44:22 UTC
Upstream design document: https://freeipa.readthedocs.io/en/latest/designs/adtrust/sudorules-with-ad-objects.html

Comment 28 Michal Polovka 2021-02-02 11:25:10 UTC
Verified using ipa-server-4.9.1-1.module+el8.4.0+9665+c9815399.x86_64 and ipa-server-trust-ad-4.9.1-1.module+el8.4.0+9665+c9815399.x86_64 in RHEL8.4 nightly build.

Passed 	test_integration/test_trust.py::TestTrust::()::test_sudorules_ad_users
Passed 	test_integration/test_trust.py::TestTrust::()::test_sudorules_ad_groups	
Passed 	test_integration/test_trust.py::TestTrust::()::test_sudorules_ad_runasuser
Passed 	test_integration/test_trust.py::TestTrust::()::test_sudorules_ad_runasuser_group
Passed 	test_integration/test_trust.py::TestTrust::()::test_sudorules_ad_runasgroup

Full test log is available as an attachment of this BZ.

Comment 31 errata-xmlrpc 2021-05-18 15:47: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 (Moderate: idm:DL1 and idm:client security, bug fix, and enhancement update), 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-2021:1846


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