pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0021-Add-missing-example-to-sudorule.patch

9991ea
From f85b3ba942c0347c197cd738fab444fe9a697a62 Mon Sep 17 00:00:00 2001
9991ea
From: Martin Kosek <mkosek@redhat.com>
9991ea
Date: Wed, 15 Jan 2014 09:31:37 +0100
9991ea
Subject: [PATCH 21/25] Add missing example to sudorule
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4090
9991ea
---
9991ea
 ipalib/plugins/sudorule.py | 21 ++++++++++++++++++++-
9991ea
 1 file changed, 20 insertions(+), 1 deletion(-)
9991ea
9991ea
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
9991ea
index a89941cb6ab9b258de26bb7cf3632dc0acc7e20e..9644aafa263b4790c8123d177f0ccd10b572f0f0 100644
9991ea
--- a/ipalib/plugins/sudorule.py
9991ea
+++ b/ipalib/plugins/sudorule.py
9991ea
@@ -52,7 +52,26 @@
9991ea
 -h ipa.example.com -ZZ -D "cn=Directory Manager" \
9991ea
 uid=sudo,cn=sysaccounts,cn=etc,dc=example,dc=com
9991ea
 
9991ea
-For more information, see the FreeIPA Documentation to Sudo.
9991ea
+EXAMPLES:
9991ea
+
9991ea
+ Create a new rule:
9991ea
+   ipa sudorule-add readfiles
9991ea
+
9991ea
+ Add sudo command object and add it as allowed command in the rule:
9991ea
+   ipa sudocmd-add /usr/bin/less
9991ea
+   ipa sudorule-add-allow-command readfiles --sudocmds /usr/bin/less
9991ea
+
9991ea
+ Add a host to the rule:
9991ea
+   ipa sudorule-add-host readfiles --hosts server.example.com
9991ea
+
9991ea
+ Add a user to the rule:
9991ea
+   ipa sudorule-add-user readfiles --users jsmith
9991ea
+
9991ea
+ Add a special Sudo rule for default Sudo server configuration:
9991ea
+   ipa sudorule-add defaults
9991ea
+
9991ea
+ Set a default Sudo option:
9991ea
+   ipa sudorule-add-option defaults --sudooption '!authenticate'
9991ea
 """)
9991ea
 
9991ea
 topic = ('sudo', _('Commands for controlling sudo configuration'))
9991ea
-- 
9991ea
1.8.4.2
9991ea