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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...