Bug 1049464

Summary: Missing examples in sudorule help
Product: Red Hat Enterprise Linux 7 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Martin Kosek <mkosek>
Status: CLOSED CURRENTRELEASE QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: rcritten, spoore
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.3.3-12.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:09:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2014-01-07 15:22:23 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/4090

Enhance `ipa help sudorule` online help and add few examples how to manipulate with sudo rules. Make sure to include an example how to set the default list of server side SUDO options as it is not intuitive that it is done via sudo rule called ''defaults'':

{{{
# ipa sudorule-add defaults
--------------------------
Added Sudo Rule "defaults"
--------------------------
   Rule name: defaults
   Enabled: TRUE

# ipa sudorule-add-option defaults --sudooption '!authenticate'
----------------------------------------------------
Added option "!authenticate" to Sudo Rule "defaults"
----------------------------------------------------
   Rule name: defaults
   Enabled: TRUE
   Sudo Option: !authenticate
}}}

Comment 3 Scott Poore 2014-01-29 01:46:57 UTC
Verified.

Version ::

ipa-server-3.3.3-15.el7.x86_64

Test Results ::

[root@rhel7-4 ~]# ipa help sudorule
Sudo Rules

...

EXAMPLES:

 Create a new rule:
   ipa sudorule-add readfiles

 Add sudo command object and add it as allowed command in the rule:
   ipa sudocmd-add /usr/bin/less
   ipa sudorule-add-allow-command readfiles --sudocmds /usr/bin/less

 Add a host to the rule:
   ipa sudorule-add-host readfiles --hosts server.example.com

 Add a user to the rule:
   ipa sudorule-add-user readfiles --users jsmith

 Add a special Sudo rule for default Sudo server configuration:
   ipa sudorule-add defaults

 Set a default Sudo option:
   ipa sudorule-add-option defaults --sudooption '!authenticate'
...

Comment 4 Ludek Smid 2014-06-13 11:09:04 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.