From aab27a76e2d847533aab7632c657aa88fdd86f7a Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 15 Feb 2011 14:03:00 -0500 Subject: Require ipactl be run as root to avoid a lot of misleading error msgs. Trying to run ipactl as non-root results in a slew of bogus error messages, some of which come because dirsrv can't read certain files as the wrong user, some based on our handling of that fact. ticket 936 --- install/tools/ipactl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/tools/ipactl b/install/tools/ipactl index 6b6db7806..5d8c6dc25 100755 --- a/install/tools/ipactl +++ b/install/tools/ipactl @@ -20,6 +20,7 @@ import sys try: + import os from ipaserver.install import service from ipaserver.install import dsinstance from ipapython import config @@ -226,6 +227,8 @@ def ipa_status(): print "Failed to get %s Service status" % svc def main(): + if not os.getegid() == 0: + sys.exit("\nYou must be root to run ipactl.\n") safe_options, options, args = parse_options() -- cgit