<?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: /bin/false as loginshell for splunkforwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143891#M29375</link>
    <description>&lt;P&gt;No. For a clean install process, this should not be needed.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2014 06:45:55 GMT</pubDate>
    <dc:creator>HansWurscht</dc:creator>
    <dc:date>2014-09-30T06:45:55Z</dc:date>
    <item>
      <title>/bin/false as loginshell for splunkforwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143889#M29373</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;is it possible to use &lt;EM&gt;/bin/false&lt;/EM&gt; as a loginshell for the user running splunkforwarder? &lt;/P&gt;

&lt;P&gt;The splunkforwarder process seems to work with /bin/false, but running &lt;EM&gt;enable boot-start&lt;/EM&gt; as root doesn't seem to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# /opt/splunkforwarder/bin/splunk enable boot-start -user splunk
This account is currently not available.
First-time-run has not finished.  Ignore this error when previewing migration - exiting.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone confirm this behaviour?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 07:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143889#M29373</guid>
      <dc:creator>HansWurscht</dc:creator>
      <dc:date>2014-09-29T07:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: /bin/false as loginshell for splunkforwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143890#M29374</link>
      <description>&lt;P&gt;Have you tried to enable boot start while splunk user still has a valid shell, and then changing it back to /bin/false? Does it start at reboot (or "service start splunk")?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 08:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143890#M29374</guid>
      <dc:creator>felipetesta</dc:creator>
      <dc:date>2014-09-29T08:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: /bin/false as loginshell for splunkforwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143891#M29375</link>
      <description>&lt;P&gt;No. For a clean install process, this should not be needed.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 06:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143891#M29375</guid>
      <dc:creator>HansWurscht</dc:creator>
      <dc:date>2014-09-30T06:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: /bin/false as loginshell for splunkforwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143892#M29376</link>
      <description>&lt;P&gt;Hi HansWurscht,&lt;/P&gt;

&lt;P&gt;When you un the enable boot-start, splunk creates the file splunk-launch.conf in /opt/splunkforwarder/etc. The problem seems to be that splunk needs a shell to create this file, so it has the privileges of the splunk user. I can't say whether this is a bug in splunk.&lt;/P&gt;

&lt;P&gt;Apart from temporarily enabling a login shell to the splunk user and disabling it immediately after, you can also run the enable command without the -user option and manually edit splunk-launch.conf.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;CODE&gt;# /opt/splunkforwarder/bin/splunk enable boot-start&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;edit &lt;CODE&gt;/opt/splunkforwarder/etc/splunk-launch.conf&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;make sure it has the line: &lt;CODE&gt;SPLUNK_OS_USER = splunk&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;possibly &lt;CODE&gt;chown splunk:splunk /opt/splunkforwarder/etc/splunk-launch.conf&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;At least, make sure the splunk user can read the file&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Out of curiosity, which OS are you using? This seems to affect at least Debian-based systems.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 09:13:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143892#M29376</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2014-09-30T09:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: /bin/false as loginshell for splunkforwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143893#M29377</link>
      <description>&lt;P&gt;There issue will be different depending on the version of Splunk&lt;/P&gt;

&lt;P&gt;Prior to 6.1""/splunks/splunkforwarder/bin/splunk" start --no-prompt --answer-yes would create line in init.d/splunk like&lt;/P&gt;

&lt;P&gt;/bin/su - shaky -c "\"/splunks/splunkforwarder/bin/splunk\" start --no-prompt --answer-yes"&lt;/P&gt;

&lt;P&gt;At 6.1 things changed a lot. splunk enable boot-start -user shaky now creates a script like&lt;BR /&gt;
"/splunks/splunkforwarder/bin/splunk" start --no-prompt --answer-yes&lt;BR /&gt;
Note there is no "su" here  The user name is taken from SPLUNK_OS_USER in launch.conf &lt;/P&gt;

&lt;P&gt;Using the the pre 6.1 method with a user that has a /bin/false shell will be problematic as /bin/sh - shaky -c  it interpretated as &lt;BR /&gt;
$SHELL -c  after "su is run and /bin/false -c  will fail&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/143893#M29377</guid>
      <dc:creator>dshakespeare_sp</dc:creator>
      <dc:date>2020-09-28T17:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: /bin/false as loginshell for splunkforwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/568015#M100828</link>
      <description>&lt;P&gt;As of today on a CentOS 6 server we tested to modify the shell for splunk user from /bin/bash to /sbin/nologin&lt;/P&gt;&lt;P&gt;On this server it is running the Splunk Universal Forwarder.&lt;/P&gt;&lt;P&gt;After having modified the /etc/passwd file and restarted the Splunk Universal Forwarder it is still working, as well as the scripts directly launched by it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#to modify the shell
usermod -s /sbin/nologin splunk

#to restart the Universal Forwarder
/etc/init.d/splunk restart&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 12:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bin-false-as-loginshell-for-splunkforwarder/m-p/568015#M100828</guid>
      <dc:creator>edoardo_vicendo</dc:creator>
      <dc:date>2021-09-22T12:10:58Z</dc:date>
    </item>
  </channel>
</rss>

