diff --git a/salt/common/tools/sbin/so-rule b/salt/common/tools/sbin/so-rule index bbb916807..bd1556f58 100755 --- a/salt/common/tools/sbin/so-rule +++ b/salt/common/tools/sbin/so-rule @@ -349,7 +349,9 @@ def sigint_handler(*_): def main(): signal.signal(signal.SIGINT, sigint_handler) - + if os.geteuid() != 0: + print('You must run this script as root', file=sys.stderr) + sys.exit(1) apply_help='After updating rule configuration, apply the idstools state.'