Installation

Installing Splunk with existing splunk.secret

matthewssa
Path Finder

Hello!

My situation is I'm doing a new installation of Splunk on a windows instance with an existing splunk.secret.

Question: Is there a command line flag to pass the splunk.secret during the initial installation?

My process in the past was to install Splunk without launching in order to prevent passwords from being generated. Then copy the splunk.secret over and start Splunk. It has been a while though and I think something changed, because Splunk writes a password to server.conf even if it isn't started for the first time. Now I have to remove the password with another command before starting it. 

Labels (2)
Tags (2)
0 Karma

matthewssa
Path Finder
This was a writeup that I did for this
 
Backup Splunk
  1. Stop and Backup the entire Splunk folder if able.
/opt/splunk/bin/splunk stop
 
tar -zcvf splunk_pre_secret.tar.gz /opt/splunk/etc
 
Find encrypted passwords
find /opt/splunk/etc -name '*.conf' -exec grep -inH '\$[0-9]\$' {} \;
 
  1. Record the context (file location, stanza, parameter)
  2. Can decrypt the hashed passwords with the following
/opt/splunk/bin/splunk show-decrypted --value 'PASSWORDHASH'
 
Updating the splunk.secret
  1. Copy the splunk.secret file from 192.168.70.2 to /opt/splunk/etc/auth/splunk.secret on the target system.
cp /home/dapslunk/splunk.secret /opt/splunk/etc/auth/splunk.secret

 

  1. Ensure the permissions are correct 400
ll /opt/splunk/etc/auth/splunk.secret
 
Update all of the password sections
  1. Use the following to find any missed passwords that have not been corrected.
find /opt/splunk/etc -name '*.conf' -exec grep -inH '\$[0-9]\$' {} \;
 
Restart Splunk
/opt/splunk/bin/splunk restart
 
Verify
  1. Access to Splunk GUI
  2. If any splunk commands that require authentication work
  3. Connection to license master /cluster/ deployment server
  4. If any inputs have data coming in
  5. If LDAP authentication works
  6. If all passwords are encrypted. Use the command from before.
0 Karma

woodcock
Esteemed Legend

Install Splunk the way that you plan to.  Start Splunk. See what the pat is where it creates the splunk.secret file.  Stop Splunk.  Remove EVERYTHING.  Reinstall Splunk. BEFORE YOU START SPLUNK, drop the splunk.secret file.  Start Splunk.

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...