<?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 Re: splunk enable boot-start -user in Splunk 6.1.1 in Installation</title>
    <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177996#M9976</link>
    <description>&lt;P&gt;We've seen the same problem: indexes and config files owned by root. Probably going to have to switch back to the old style startup script to be sure - but this seems like a bug, currently.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Oct 2014 13:07:12 GMT</pubDate>
    <dc:creator>johntobin</dc:creator>
    <dc:date>2014-10-09T13:07:12Z</dc:date>
    <item>
      <title>splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177987#M9967</link>
      <description>&lt;P&gt;Hi folks..&lt;/P&gt;

&lt;P&gt;just did a clean 6.1.1 install.. is it just me? or is "splunk enable boot-start -user &lt;USERNAME&gt;" broken? &lt;/USERNAME&gt;&lt;/P&gt;

&lt;P&gt;it used to create a startup script in /etc/init.d/splunk with "/bin/su - &lt;USERNAME&gt;" everywhere in the script.. but this time the "su -" parts are all missing and caused me some grief with splunkd not starting...&lt;/USERNAME&gt;&lt;/P&gt;

&lt;P&gt;ie... 6.1.1... /etc/init.d/splunk&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_start() {
  echo Starting Splunk...
  "/app/splunk/bin/splunk" start --no-prompt --answer-yes
  RETVAL=$?
}
splunk_stop() {
  echo Stopping Splunk...
  "/app/splunk/bin/splunk" stop
  RETVAL=$?
}
splunk_restart() {
  echo Restarting Splunk...
  "/app/splunk/bin/splunk" restart
  RETVAL=$?
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;version 6.0... /etc/init.d/splunk  (where user specified is 'splunk'&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_start() {
  echo Starting Splunk...
  /bin/su - splunk -c "\"/app/splunk/bin/splunk\" start --no-prompt --answer-yes"
  RETVAL=$?
}
splunk_stop() {
  echo Stopping Splunk...
  /bin/su - splunk -c "\"/app/splunk/bin/splunk\" stop "
  RETVAL=$?
}
splunk_restart() {
  echo Restarting Splunk...
  /bin/su - splunk -c "\"/app/splunk/bin/splunk\" restart "
  RETVAL=$?
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 May 2014 00:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177987#M9967</guid>
      <dc:creator>ofwsplunk</dc:creator>
      <dc:date>2014-05-26T00:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177988#M9968</link>
      <description>&lt;P&gt;I am seeing the same thing.&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2014 12:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177988#M9968</guid>
      <dc:creator>jensmartin</dc:creator>
      <dc:date>2014-05-26T12:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177989#M9969</link>
      <description>&lt;P&gt;I'm seeing the same thing and came here to Answers to see if anyone else has run into this:&lt;/P&gt;

&lt;P&gt;If I run&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk enable boot-start -user splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;on a Scientific Linux machine with Splunk 6.0.3 installed, the command works as expected, creating a splunk script in /etc/init.d that does an su to the splunk user:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_start() {
    echo Starting Splunk...
    /bin/su - splunk -c "\"/opt/splunk/bin/splunk\" start --no-prompt --answer-yes"
    RETVAL=$?
    [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/splunk
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I do the same thing on a different Scientific Linux machine with Splunk 6.1.1 installed, the /etc/init.d/splunk script gets created, but the su - splunk switch to the splunk user is not added.  It's as if the enable boot-start command was run without the -user flag.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_start() {
    echo Starting Splunk...
    "/opt/splunk/bin/splunk" start --no-prompt --answer-yes
    RETVAL=$?
    [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/splunk
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I run&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;chkconfig --list | grep splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it returns the same results on both servers:&lt;BR /&gt;
    splunk          0:off   1:off   2:on    3:on    4:on    5:on    6:off&lt;BR /&gt;
    splunk          0:off   1:off   2:on    3:on    4:on    5:on    6:off&lt;/P&gt;

&lt;P&gt;I'm running both commands as root from within $SPLUNK_HOME/bin.  These are different servers, of course, and the environments are not identical. Both are 64 bit SL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Splunk 6.0.3: Linux somosomo 2.6.32-220.4.1.el6.x86_64 #1 SMP Mon Jan 23 17:20:44 CST 2012 x86_64 x86_64 x86_64 GNU/Linux

Splunk 6.1.1: Linux SL64X86X64-00 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 20:37:17 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm setting up another server to test with now, but this is feeling like a 6.1 (or 6.1.1) issue.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 03:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177989#M9969</guid>
      <dc:creator>wethackrey</dc:creator>
      <dc:date>2014-06-02T03:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177990#M9970</link>
      <description>&lt;P&gt;To solve this I edited:&lt;BR /&gt;
/opt/splunkforwarder/etc/splunk-launch.conf&lt;/P&gt;

&lt;P&gt;And set the SPLUNK_OS_USER option in that file. &lt;BR /&gt;
I packaged a version of this file in my install script to not have to edit it on all installs.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177990#M9970</guid>
      <dc:creator>jensmartin</dc:creator>
      <dc:date>2020-09-28T16:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177991#M9971</link>
      <description>&lt;P&gt;We've opened a case for this: 171993&lt;BR /&gt;
... but as we do more research, this looks like it may be the new expected behavior in 6.1.1.&lt;/P&gt;

&lt;P&gt;We note that the enable boot-start -user &amp;lt;&lt;USERNAME&gt;&amp;gt; command adds the stanza mentioned by jensmartin to /etc/splunk-launch.conf:&lt;/USERNAME&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SPLUNK_OS_USER=&amp;lt;&amp;lt;username&amp;gt;&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This causes Splunk 6.1.1 to start as the &amp;lt;&lt;USERNAME&gt; user even without an su to that user in /etc/init.d/splunk.&lt;/USERNAME&gt;&lt;/P&gt;

&lt;P&gt;Also, interestingly, if we set the -user flag to a user unknown to the OS, Splunk complains:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[splunk@sharepath bin]$ ./splunk enable boot-start -user elmonteslimm
Overwriting present value (splunk) of SPLUNK_OS_USER in         
/opt/splunkforwarder/etc/splunk-launch.conf
su: user elmonteslimm does not exist
First-time-run has not finished.  Ignore this error when previewing migration - exiting.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...but it adds a SPLUNK_OS_USER stanza for that user to splunk-launch.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SPLUNK_OS_USER=elmonteslimm
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note the following comments are in the splunk-launch.conf file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# If SPLUNK_OS_USER is set, then Splunk service will only start
# if the 'splunk [re]start [splunkd]' command is invoked by a user who
# is, or can effectively become via setuid(2), $SPLUNK_OS_USER.
# (This setting can be specified as username or as UID.)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177991#M9971</guid>
      <dc:creator>wethackrey</dc:creator>
      <dc:date>2020-09-28T16:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177992#M9972</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;I ran into serious trouble with this new method of starting splunk. I do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk enable boot-start -user splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and now my running splunkforwarder cannot access the /var/log/messages, secure etc. anymore, even though they are accessible to the group of the splunk user:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-rw-r-----. 1 root splunk    145 Jun 29 03:37 messages
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With the old method of &lt;CODE&gt;/bin/su - splunk -c "\"/opt/splunk/bin/splunk\" start --no-prompt --answer-yes"&lt;/CODE&gt; everything was fine.&lt;/P&gt;

&lt;P&gt;any ideas - except setting 644 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2014 10:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177992#M9972</guid>
      <dc:creator>tugnet</dc:creator>
      <dc:date>2014-07-04T10:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177993#M9973</link>
      <description>&lt;P&gt;i forgot: /etc/splunk-launch.conf is ok, SPLUNK_OS_USER=splunk is set.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177993#M9973</guid>
      <dc:creator>tugnet</dc:creator>
      <dc:date>2020-09-28T16:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177994#M9974</link>
      <description>&lt;P&gt;(and SELinux is turned off), OS: CentOS 6.5&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2014 10:46:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177994#M9974</guid>
      <dc:creator>tugnet</dc:creator>
      <dc:date>2014-07-04T10:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177995#M9975</link>
      <description>&lt;P&gt;I've run into similar issues, though not with the "splunk" group directly.  I assigned a "splunklog" group I used for logs, of which, the "splunk" user is a member (along with a few other admins).   The problems seems to within the user switching approach within splunk binary, the groups don't get taken into account.  Same thing happens with ulimits.  If you launch splunk directly (by using sudo/su) then all works as expected; but not so if you launch as root.   I too reverted back to the old-style init.d scripts to avoid this issue.  Oh, and I've also randomly seen that files created by splunk (indexes, config files, ...) sometimes have the group of root assigned to them.   Weird.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2014 16:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177995#M9975</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2014-10-04T16:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177996#M9976</link>
      <description>&lt;P&gt;We've seen the same problem: indexes and config files owned by root. Probably going to have to switch back to the old style startup script to be sure - but this seems like a bug, currently.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 13:07:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177996#M9976</guid>
      <dc:creator>johntobin</dc:creator>
      <dc:date>2014-10-09T13:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: splunk enable boot-start -user in Splunk 6.1.1</title>
      <link>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177997#M9977</link>
      <description>&lt;P&gt;I've seen the same thing as both Lowell and johntobin.  We recently upgraded from 6.0.2 to 6.1.3, and wound up with a number of files I had to chown to the splunk user.&lt;/P&gt;

&lt;P&gt;Additionally, we have run into a permissions issue when it starts up:&lt;/P&gt;

&lt;P&gt;WARN  FilesystemChangeWatcher - error reading directory "/path/to/syslogs": Permission denied&lt;/P&gt;

&lt;P&gt;The splunk user is part of a group which has read only access to these files.  Unfortunately, with the new init script setup and the SPLUNK_OS_USER (which is set properly in /opt/splunkforwarder/etc/splunk-launch.conf) this fails to start up.&lt;/P&gt;

&lt;P&gt;Workarounds seem to be as previously stated:&lt;/P&gt;

&lt;P&gt;1) su to the splunk user and start it with /opt/splunkforwarder/bin/splunk start&lt;BR /&gt;
OR&lt;BR /&gt;
2) Revert to the old init script.&lt;/P&gt;

&lt;P&gt;Either of these work.&lt;/P&gt;

&lt;P&gt;Just wanted to point out this had not been fixed yet as of 6.1.3.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/splunk-enable-boot-start-user-in-Splunk-6-1-1/m-p/177997#M9977</guid>
      <dc:creator>edekker</dc:creator>
      <dc:date>2020-09-28T18:07:10Z</dc:date>
    </item>
  </channel>
</rss>

