I'm trying to start Splunk on an initial install as a user other than root (splrun).
I create the user account, set a password, and then installed but did not start Splunk as root
and then took the following steps
chown -R splrun:splrun /opt/splunk
/opt/splunk/bin/splunk enable boot-start --accept-license -user splrun
/opt/splunk/bin/splunk start -user splrun .... this failed with a permissions error so I reran chown -R... from above, then reran ..start -user splrun
At this point the webservice (8000) started but the management service (8089) states
"Starting splunk server daemon (splunkd)... Bad Option -u"
then eventually states "Timed out waiting for splunkd to start. [FAILED]"
Running ..splunk status shows
splunkd is not running.
splunkweb is running (PID: 9044).
I appreciate any help in learning how to start Splunk as a non-root user.
Thanks!
We have no -user flag on 'splunk start'.
Try 'splunk help start'.
In order to run splunk as a particular user:
OR
Thank you for the insight.
Followup question.
I create a user named splrun on the client machine prior to installing Splunk Enterprise via script.
This fails during installation with permission denied issues during the installation.
What is the correct method of prepping the delivery location to avoid this problem.
Thank You.
after enabling boot-start
with -user
, you should not use splunk start
to start splunk. Instead, you need to use service splunk start
. The boot-start
installs a startup service that runs as the non-root user. There is no -user
option on splunk start
.
You will need to configure the boot-start user for splunk.
$splunk_home/bin/splunk enable boot-start -user userIwantSplunktoRunAS
e.g. As root: $ /opt/splunk/bin/splunk enable boot-start -user splunkdaemon
That tell splunk which user to run as when the system starts splunk. Not that when you try and start splunk, you need to su or be logged in as that user. If you run it as root, or a different user, it will wreak havoc on your splunk install by resetting permissions and other potentially destructive things.
We have no -user flag on 'splunk start'.
Try 'splunk help start'.
In order to run splunk as a particular user:
OR