<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using polkit allows for stopping/starting other systemd services in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539369#M4912</link>
    <description>&lt;P&gt;We upgraded to 8.1.2 and want to use workload manager, workload manager requires systemd.&amp;nbsp; With 8.1.x you can allow the splunk user to stop/start the systemd splunk service, which works fine however it seems to be to broad of a configuration and also allows for stopping/starting other systemd services as well.&amp;nbsp; Is there a way to lock down the polkit rule where it doesn't grant beyond the splunk service?&amp;nbsp; I'll do more research on polkit to see if I can find a way but wondering if others have done this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sh-4.2$&amp;nbsp;sudo /apps/splunk/bin/splunk enable boot-start -systemd-managed 1 -create-polkit-rules 1 -user splunk&lt;BR /&gt;CAUTION: The system has systemd version &amp;lt; 237 and polkit version &amp;gt; 105. With this combination, polkit rule created for this user will enable this user to manage all systemd services.Are you sure you want to continue [y/n]? y&lt;BR /&gt;Systemd unit file installed at /etc/systemd/system/Splunkd.service.&lt;BR /&gt;Polkit rules file installed at /etc/polkit-1/rules.d/10-Splunkd.rules.&lt;BR /&gt;Configured as systemd managed service.&lt;/P&gt;&lt;P&gt;sh-4.2$ sudo su - splunk&lt;/P&gt;&lt;P&gt;splunk@qasshd$&amp;nbsp;systemctl stop amazon-ssm-agent.service&lt;BR /&gt;splunk@qasshd$ systemctl status amazon-ssm-agent.service&lt;BR /&gt;● amazon-ssm-agent.service - amazon-ssm-agent&lt;BR /&gt;Loaded: loaded (/etc/systemd/system/amazon-ssm-agent.service; enabled; vendor preset: disabled)&lt;BR /&gt;Active: inactive (dead) since Wed 2021-02-10 22:19:39 UTC; 7s ago&lt;BR /&gt;Process: 1130 ExecStart=/usr/bin/amazon-ssm-agent (code=exited, status=0/SUCCESS)&lt;BR /&gt;Main PID: 1130 (code=exited, status=0/SUCCESS)&lt;BR /&gt;splunk@qasshd$ systemctl start amazon-ssm-agent.service&lt;BR /&gt;splunk@qasshd$ systemctl status amazon-ssm-agent.service&lt;BR /&gt;● amazon-ssm-agent.service - amazon-ssm-agent&lt;BR /&gt;Loaded: loaded (/etc/systemd/system/amazon-ssm-agent.service; enabled; vendor preset: disabled)&lt;BR /&gt;Active: active (running) since Wed 2021-02-10 22:19:55 UTC; 3s ago&lt;BR /&gt;Main PID: 5087 (amazon-ssm-agen)&lt;BR /&gt;Memory: 30.6M&lt;BR /&gt;CGroup: /system.slice/amazon-ssm-agent.service&lt;BR /&gt;├─5087 /usr/bin/amazon-ssm-agent&lt;BR /&gt;└─5101 /usr/bin/ssm-agent-worker&lt;BR /&gt;splunk@qasshd$&lt;/P&gt;&lt;P&gt;This is our rules file:&lt;/P&gt;&lt;P&gt;/etc/polkit-1/rules.d/10-Splunkd.rules&lt;BR /&gt;polkit.addRule(function(action, subject) {&lt;BR /&gt;if (action.id == "org.freedesktop.systemd1.manage-units" &amp;amp;&amp;amp;&lt;BR /&gt;subject.user == "splunk")&lt;BR /&gt;{&lt;BR /&gt;return polkit.Result.YES;&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 22:31:38 GMT</pubDate>
    <dc:creator>amartin6</dc:creator>
    <dc:date>2021-02-10T22:31:38Z</dc:date>
    <item>
      <title>Using polkit allows for stopping/starting other systemd services</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539369#M4912</link>
      <description>&lt;P&gt;We upgraded to 8.1.2 and want to use workload manager, workload manager requires systemd.&amp;nbsp; With 8.1.x you can allow the splunk user to stop/start the systemd splunk service, which works fine however it seems to be to broad of a configuration and also allows for stopping/starting other systemd services as well.&amp;nbsp; Is there a way to lock down the polkit rule where it doesn't grant beyond the splunk service?&amp;nbsp; I'll do more research on polkit to see if I can find a way but wondering if others have done this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sh-4.2$&amp;nbsp;sudo /apps/splunk/bin/splunk enable boot-start -systemd-managed 1 -create-polkit-rules 1 -user splunk&lt;BR /&gt;CAUTION: The system has systemd version &amp;lt; 237 and polkit version &amp;gt; 105. With this combination, polkit rule created for this user will enable this user to manage all systemd services.Are you sure you want to continue [y/n]? y&lt;BR /&gt;Systemd unit file installed at /etc/systemd/system/Splunkd.service.&lt;BR /&gt;Polkit rules file installed at /etc/polkit-1/rules.d/10-Splunkd.rules.&lt;BR /&gt;Configured as systemd managed service.&lt;/P&gt;&lt;P&gt;sh-4.2$ sudo su - splunk&lt;/P&gt;&lt;P&gt;splunk@qasshd$&amp;nbsp;systemctl stop amazon-ssm-agent.service&lt;BR /&gt;splunk@qasshd$ systemctl status amazon-ssm-agent.service&lt;BR /&gt;● amazon-ssm-agent.service - amazon-ssm-agent&lt;BR /&gt;Loaded: loaded (/etc/systemd/system/amazon-ssm-agent.service; enabled; vendor preset: disabled)&lt;BR /&gt;Active: inactive (dead) since Wed 2021-02-10 22:19:39 UTC; 7s ago&lt;BR /&gt;Process: 1130 ExecStart=/usr/bin/amazon-ssm-agent (code=exited, status=0/SUCCESS)&lt;BR /&gt;Main PID: 1130 (code=exited, status=0/SUCCESS)&lt;BR /&gt;splunk@qasshd$ systemctl start amazon-ssm-agent.service&lt;BR /&gt;splunk@qasshd$ systemctl status amazon-ssm-agent.service&lt;BR /&gt;● amazon-ssm-agent.service - amazon-ssm-agent&lt;BR /&gt;Loaded: loaded (/etc/systemd/system/amazon-ssm-agent.service; enabled; vendor preset: disabled)&lt;BR /&gt;Active: active (running) since Wed 2021-02-10 22:19:55 UTC; 3s ago&lt;BR /&gt;Main PID: 5087 (amazon-ssm-agen)&lt;BR /&gt;Memory: 30.6M&lt;BR /&gt;CGroup: /system.slice/amazon-ssm-agent.service&lt;BR /&gt;├─5087 /usr/bin/amazon-ssm-agent&lt;BR /&gt;└─5101 /usr/bin/ssm-agent-worker&lt;BR /&gt;splunk@qasshd$&lt;/P&gt;&lt;P&gt;This is our rules file:&lt;/P&gt;&lt;P&gt;/etc/polkit-1/rules.d/10-Splunkd.rules&lt;BR /&gt;polkit.addRule(function(action, subject) {&lt;BR /&gt;if (action.id == "org.freedesktop.systemd1.manage-units" &amp;amp;&amp;amp;&lt;BR /&gt;subject.user == "splunk")&lt;BR /&gt;{&lt;BR /&gt;return polkit.Result.YES;&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 22:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539369#M4912</guid>
      <dc:creator>amartin6</dc:creator>
      <dc:date>2021-02-10T22:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using polkit allows for stopping/starting other systemd services</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539371#M4913</link>
      <description>&lt;P&gt;splunk@qasshd$ rpm -qa polkit&lt;BR /&gt;polkit-0.112-26.el7.x86_64&lt;BR /&gt;splunk@qasshd$&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 22:37:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539371#M4913</guid>
      <dc:creator>amartin6</dc:creator>
      <dc:date>2021-02-10T22:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using polkit allows for stopping/starting other systemd services</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539372#M4914</link>
      <description>&lt;P&gt;splunk@qasshd$ rpm -qa systemd&lt;BR /&gt;systemd-219-78.el7_9.2.x86_64&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 22:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/539372#M4914</guid>
      <dc:creator>amartin6</dc:creator>
      <dc:date>2021-02-10T22:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using polkit allows for stopping/starting other systemd services</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/571380#M10383</link>
      <description>&lt;P&gt;Yes, they do.&amp;nbsp; Because RHEL7's systemd and polkit are just OLD and the features you need really aren't there.&amp;nbsp; See &lt;A href="https://www.duanewaddle.com/splunk-7-2-2-and-systemd/" target="_blank"&gt;https://www.duanewaddle.com/splunk-7-2-2-and-systemd/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 17:43:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/571380#M10383</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2021-10-18T17:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using polkit allows for stopping/starting other systemd services</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/571385#M10384</link>
      <description>&lt;P&gt;Correct, the older version of polkit is what we discovered&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 17:57:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/571385#M10384</guid>
      <dc:creator>amartin6</dc:creator>
      <dc:date>2021-10-18T17:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using polkit allows for stopping/starting other systemd services</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/571548#M10404</link>
      <description>&lt;P&gt;If systemd version is greater than 236 and polkit version is greater than 0.105 then user has access to only Splunk service managed by systemd else it gives access to all the services managed by systemd.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Admin/RunSplunkassystemdservice#:~:text=file%20naming%20considerations.-,Install%20polkit%20rules%20to%20elevate%20user%20permissions,-In%20version%208.1.1" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Admin/RunSplunkassystemdservice#:~:text=file%20naming%20considerations.-,Install%20polkit%20rules%20to%20elevate%20user%20permissions,-In%20version%208.1.1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 19:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Using-polkit-allows-for-stopping-starting-other-systemd-services/m-p/571548#M10404</guid>
      <dc:creator>svarkhede</dc:creator>
      <dc:date>2021-10-19T19:08:29Z</dc:date>
    </item>
  </channel>
</rss>

