Getting Data In

How to install Splunk UFD without asking for password in Linux?

pkumar9610
Explorer

HI Friends,

I am installing Splunk UFD 7.2.5, but when I run the command (/opt/splunk/bin/splunk start --accept-license) its asking for the password. Is there a way I can install UFD without asking password ?

Previously we have SPLUNK UFD 6 version and when we run the same command it doesn't ask for password. I think some file is hardcoded to take default password (changeme). Can you please point me in which file I need to make this change to not to ask password so that I can put this as part of automated script to install Splunk UFD.

0 Karma
1 Solution

worshamn
Contributor

You either have to supply the credentials (either in the clear or hashed) using $SPLUNK_HOME/etc/system/local/user-seed.conf and using the --no-prompt command line option when running the first time:

[user_info]
USERNAME = admin
PASSWORD =
HASHED_PASSWORD =

Or use --seed-passwd or --gen-and-print-passwd as part of the arguments. Either way the documentation is found here:

https://docs.splunk.com/Documentation/Splunk/latest/Security/Secureyouradminaccount#Create_admin_cre...

View solution in original post

thomaslord
New Member

Use this.

sudo /opt/splunkforwarder/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd PASSWORD

Where you see PASSWORD enter your own or populate with a variable.,I found a fix to this when installing Splunk UFC 8.0.1

sudo /opt/splunkforwarder/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd PASSWORD

When sub PASSWORD with you password, it'll create the admin account and breeze through the install.

0 Karma

hesbee
Observer

I tried the command you provided but it gave an error while completing the installation. Here is the error I got:

Creating unit file... Failed to auto-set default user. Failed to create the unit file. Please do it manually later.

Please, how do I fix this? Thanks!

0 Karma

worshamn
Contributor

You either have to supply the credentials (either in the clear or hashed) using $SPLUNK_HOME/etc/system/local/user-seed.conf and using the --no-prompt command line option when running the first time:

[user_info]
USERNAME = admin
PASSWORD =
HASHED_PASSWORD =

Or use --seed-passwd or --gen-and-print-passwd as part of the arguments. Either way the documentation is found here:

https://docs.splunk.com/Documentation/Splunk/latest/Security/Secureyouradminaccount#Create_admin_cre...

pkumar9610
Explorer

I have tried this and it works, thank you for the quick response & solution.

We have UFD 6X version in few application servers, that doesn't have user-seed.conf file but still it doesn't ask for password, is there any other file it refers to in any other location in previous version of splunk UFD ?

0 Karma

worshamn
Contributor

No, not that I'm aware of but apparently user-seed.conf has been around for a long time, so I would think it should work for 6.X as well
https://docs.splunk.com/Documentation/Splunk/6.0/Admin/User-seedconf

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...