<?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 How do I change the user Splunk runs as? in Security</title>
    <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116752#M14397</link>
    <description>&lt;P&gt;I have installed Splunk 6.0.4 as a root user on Linux 64bit RH 6.4. However, now I would like to change the user Splunk runs as to a non-root user. Is this possible and how would it be done?&lt;/P&gt;

&lt;P&gt;-Thanks!&lt;/P&gt;</description>
    <pubDate>Sat, 31 Jan 2015 00:37:40 GMT</pubDate>
    <dc:creator>Bill_B</dc:creator>
    <dc:date>2015-01-31T00:37:40Z</dc:date>
    <item>
      <title>How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116752#M14397</link>
      <description>&lt;P&gt;I have installed Splunk 6.0.4 as a root user on Linux 64bit RH 6.4. However, now I would like to change the user Splunk runs as to a non-root user. Is this possible and how would it be done?&lt;/P&gt;

&lt;P&gt;-Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2015 00:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116752#M14397</guid>
      <dc:creator>Bill_B</dc:creator>
      <dc:date>2015-01-31T00:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116753#M14398</link>
      <description>&lt;P&gt;You can use:&lt;BR /&gt;
chown -R group:user SPLUNK_HOME&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2015 00:41:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116753#M14398</guid>
      <dc:creator>sanjay_shrestha</dc:creator>
      <dc:date>2015-01-31T00:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116754#M14399</link>
      <description>&lt;P&gt;This is documented in the Installation Manual topic, &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Installation/RunSplunkasadifferentornon-rootuser"&gt;Run Splunk Enterprise as a different or non-root user&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2015 00:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116754#M14399</guid>
      <dc:creator>ChrisG</dc:creator>
      <dc:date>2015-01-31T00:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116755#M14400</link>
      <description>&lt;P&gt;Yes. Documentation says, "&lt;STRONG&gt;before you start Splunk Enterprise for the first time, change the ownership of the $SPLUNK_HOME directory to the desired user&lt;/STRONG&gt;."&lt;BR /&gt;
But Splunk was started as root-user and has been running as root-user. So will the "chown" command work after Splunk was started and running as root-user?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2015 18:46:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116755#M14400</guid>
      <dc:creator>Bill_B</dc:creator>
      <dc:date>2015-02-02T18:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116756#M14401</link>
      <description>&lt;P&gt;Hi, this particular stipulation predates my time here.&lt;/P&gt;

&lt;P&gt;The fast fix is to reinstall Splunk and reindex.&lt;/P&gt;

&lt;P&gt;That said, I have performed &lt;CODE&gt;chown&lt;/CODE&gt;s on existing Splunk installations that have initially been started and run as root without issue.&lt;/P&gt;

&lt;P&gt;You might need to perform the &lt;CODE&gt;chown&lt;/CODE&gt; multiple times before it takes, and it's possible that a &lt;CODE&gt;chown -R&lt;/CODE&gt; from the top of the directory won't always take. I think this is why the stipulation exists.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2015 20:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116756#M14401</guid>
      <dc:creator>malmoore</dc:creator>
      <dc:date>2015-02-02T20:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116757#M14402</link>
      <description>&lt;P&gt;Thank you all for your input. &lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2015 21:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116757#M14402</guid>
      <dc:creator>Bill_B</dc:creator>
      <dc:date>2015-02-02T21:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116758#M14403</link>
      <description>&lt;P&gt;I eventually used strace to figure out how Splunk was determining the user to run as. Have a look in &lt;CODE&gt;$SPLUNK_HOME/etc/splunk-launch.conf&lt;/CODE&gt; - there's a &lt;CODE&gt;SPLUNK_OS_USER=&lt;/CODE&gt; configuration option, which you'll probably want to set to the user that owns the files.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 22:55:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116758#M14403</guid>
      <dc:creator>joelby</dc:creator>
      <dc:date>2016-01-04T22:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116759#M14404</link>
      <description>&lt;P&gt;There are two basic things that need to happen here&lt;/P&gt;

&lt;P&gt;1) Change the ownership, recursively, of the splunk_home to the new user : chown -R newuser:newgroup /opt/splunk&lt;/P&gt;

&lt;P&gt;2)  Change the user Splunk starts as. You can do this by editing the launch.conf, or more easily with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$splunk_home$/bin/splunk enable boot-start -user newuser
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Change newuser to the new username.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 03:33:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116759#M14404</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2016-01-05T03:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the user Splunk runs as?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116760#M14405</link>
      <description>&lt;P&gt;Hi! &lt;/P&gt;

&lt;P&gt;What has worked for me, especially when I would run into permission issues early in my splunking career,  is to follow the steps listed above, but then add the following touches (assuming splunk is the user you want to use):&lt;/P&gt;

&lt;P&gt;sudo $SPLUNK_HOME/bin/splunk stop (no need to have splunkd cling to files/process that retain the previous ownership)&lt;/P&gt;

&lt;P&gt;sudo su splunk &lt;/P&gt;

&lt;P&gt;sudo chown -R splunk:splunk /opt/splunk(or where ever splunk is installed)&lt;/P&gt;

&lt;P&gt;sudo $SPLUNK_HOME/bin/splunk start&lt;/P&gt;

&lt;P&gt;Let splunk run through it's initialization process and BAM! Splunk is running as the new user, all of the ownership should be changed recursively throughout the file structure, and you've removed the need to reindex data or run chown multiple times. Hopefully this works with the same magical flair for you as it has for me. But you have shout "Bam!" with an exaggerated motion or else you break the magic. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; happy splunking, my friend.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 04:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-change-the-user-Splunk-runs-as/m-p/116760#M14405</guid>
      <dc:creator>Marc785</dc:creator>
      <dc:date>2016-09-15T04:31:13Z</dc:date>
    </item>
  </channel>
</rss>

