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 1111121 - [RFE] ipa-client-install should configure sudo automatically
Summary: [RFE] ipa-client-install should configure sudo automatically
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Martin Kosek
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On: 924395
Blocks: 1036628
TreeView+ depends on / blocked
 
Reported: 2014-06-19 10:07 UTC by Martin Kosek
Modified: 2014-10-14 07:32 UTC (History)
6 users (show)

Fixed In Version: ipa-3.0.0-40.el6
Doc Type: Release Note
Doc Text:
⁠Automated sudo Configuration on IPA Clients In Red Hat Enterprise Linux 6.6, the ipa-client-install script configures the sudo utility on IPA clients by default. FreeIPA sudo integration is a widely popular feature, which can, however, pose some configuration challenges. The integration is now seamless, and ipa-client-install leverages a newly added IPA provider in sssd.
Clone Of: 924395
Environment:
Last Closed: 2014-10-14 07:32:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
snip from automation log (10.22 KB, text/x-log)
2014-07-15 08:08 UTC, Kaleem
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1383 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2014-10-14 01:21:36 UTC

Comment 3 Martin Kosek 2014-06-20 13:45:51 UTC
Small demonstration of the feature:

# hostname
vm-086.idm.lab.bos.redhat.com
# ipa-server-install

# nisdomainname <--- NIS domain name is set, required for hosgroup based SUDO rules
idm.lab.bos.redhat.com

# tail /etc/nsswitch.conf
...
sudoers: files sss   <--- sudoers is set to sssd

# grep services /etc/sssd/sssd.conf
services = nss, sudo, pam, ssh   <--- sudo is an enabled service

Now we add SUDO rule targetted on a hostgroup containing vm-086.idm.lab.bos.redhat.com and user admin:

# kinit admin
# ipa hostgroup-add foo
# ipa hostgroup-add-member foo --hosts `hostname`
# ipa sudocmd-add /usr/bin/less
# ipa sudorule-add foo
# ipa sudorule-add-user foo --users admin
# ipa sudorule-add-host foo --hostgroups foo
# ipa sudorule-add-allow-command foo --sudocmds /usr/bin/less

# ipa sudorule-show foo
  Rule name: foo
  Enabled: TRUE
  Users: admin
  Host Groups: foo
  Sudo Allow Commands: /usr/bin/less

Now we can try if sudo can read this rule through SSSD when we log as admin:

# su - admin
$ sudo -l
Matching Defaults entries for admin on this host:
    requiretty, !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE
    INPUTRC 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 admin may run the following commands on this host:
    (root) /usr/bin/less

$ sudo /usr/bin/less /etc/shadow
[sudo] password for admin: 

<--- opens the file

Comment 4 Kaleem 2014-07-15 08:07:46 UTC
Verified.

IPA version:
============
ipa-server.x86_64 0:3.0.0-42.el6

Please find the attached snip from beaker automation log.

Comment 5 Kaleem 2014-07-15 08:08:10 UTC
Created attachment 918075 [details]
snip from automation log

Comment 7 errata-xmlrpc 2014-10-14 07:32:57 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.

http://rhn.redhat.com/errata/RHBA-2014-1383.html


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