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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...