Normally you would not get prompted for creds on the actual initial start. After you accept the license splunkd starts and then any of the commands you are executing are requiring a session as long as splunkd is running. If I recall correctly you have to complete the first run and either accept the license manually or start splunk with the options you are using as the first command (start --accept-license --no-prompt --answer-yes ) so that the initial config is set, then stop splunk to reconfigure with the other 2 commands without requiring a session. This has been my experience, you start splunk the first time, then stop it, then reconfigure with enable boot-start and set deploy-poll options then start splunk.
You should not need auth options or be prompted to simply execute splunk start. Or to execute reconfiguration commands with SPLUNK_HOME/bin/splunk if splunkd has been stopped.
Does that make sense? I don't think this is specific to a solaris install, as it sounds like the same behavior I expect in a Linux environment.
BTW, this looks like it should all work as I describe if you are running splunk as root. If you plan to run splunk as a different user (e.g. splunk) then you will need to specify a user on the enable-boot, and I have found that I have also needed to correct ownership issues after running commands similar to your script as root.
... View more