<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scripting admin credentials in scripted install in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561243#M7639</link>
    <description>&lt;P&gt;You can use a hashed password, it just needs to be hashed by Splunk. It can't be a random string you create.&lt;BR /&gt;This obviously means you need to have Splunk up and running (somewhere) but here is the command:&lt;/P&gt;&lt;PRE&gt;splunk hash-passwd &amp;lt;plaintext password&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;You should be able to execute that on an unrelated node running the same Splunk version and be fine.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 18:15:41 GMT</pubDate>
    <dc:creator>codebuilder</dc:creator>
    <dc:date>2021-07-28T18:15:41Z</dc:date>
    <item>
      <title>Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561235#M7635</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Im working on a new script to install Splunk via bash. before accepting the license and starting Splunk, with no prompt and answering yes, Im creating the user-seed.conf file in system/local&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#create admin account
cd /opt/splunk/etc/system/local/
touch user-seed.conf
echo "[user_info]" &amp;gt;&amp;gt; user-seed.conf
echo "USERNAME = admin" &amp;gt;&amp;gt; user-seed.conf
echo "HASHED_PASSWORD = &amp;lt;hased pass&amp;gt;" &amp;gt;&amp;gt; user-seed.conf&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However after&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'/opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and going back and trying to find user-seed.conf it no longer exists. Im also removing any file etc/passwd before starting. When Splunk starts with the hashed pass in user-seed.conf does that file disappear or get moved?&lt;/P&gt;&lt;P&gt;Maybe Im going about this the wrong way? Better way to do this?&lt;/P&gt;&lt;P&gt;Thanks for the thoughts!&lt;/P&gt;&lt;P&gt;Todd&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 16:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561235#M7635</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2021-07-28T16:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561236#M7636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/160676"&gt;@tkw03&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;This is normal behaviour. passwd file is updated with your hashed password and users-seed.conf file is deleted.&lt;/P&gt;&lt;P&gt;I think you are able to login with the new password.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 16:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561236#M7636</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-07-28T16:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561239#M7637</link>
      <description>&lt;P&gt;Since you are starting Splunk for the first time it's not going to honor your value for the HASHED_PASSWORD parameter. Use PASSWORD instead and Splunk will hash it for you.&lt;/P&gt;&lt;P&gt;You can also use this syntax in your start command (though it does leave it behind in the command history), "admin" is the default admin user:&lt;BR /&gt;splunk start --accept-license --answer-yes --no-prompt --seed-passwd &amp;lt;your password&amp;gt;&lt;/P&gt;&lt;P&gt;If you use the user-seed.conf method (with PASSWORD) be sure the directory/file are owned by the user/group that you are running Splunk as.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 17:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561239#M7637</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2021-07-28T17:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561241#M7638</link>
      <description>&lt;P&gt;I thought that might happen. My goal is to NOT use a clear-text password but Ive been having a bit-o-trouble getting that lined out. Any thoughts on how that might be achieved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all for the assistance!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 17:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561241#M7638</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2021-07-28T17:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561243#M7639</link>
      <description>&lt;P&gt;You can use a hashed password, it just needs to be hashed by Splunk. It can't be a random string you create.&lt;BR /&gt;This obviously means you need to have Splunk up and running (somewhere) but here is the command:&lt;/P&gt;&lt;PRE&gt;splunk hash-passwd &amp;lt;plaintext password&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;You should be able to execute that on an unrelated node running the same Splunk version and be fine.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 18:15:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561243#M7639</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2021-07-28T18:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561244#M7640</link>
      <description>&lt;P&gt;There is also a validate-passwd function you can use after hashing.&lt;/P&gt;&lt;P&gt;More info here: &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Security/Secureyouradminaccount" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Security/Secureyouradminaccount&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 18:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561244#M7640</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2021-07-28T18:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561246#M7905</link>
      <description>&lt;P&gt;I did do that, the hashed pass I used in the script is the hashed password I created from the password I wanted to use. I didn't create a random hash. It doesnt appear to update passwd though so Im not sure it actually works.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 18:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561246#M7905</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2021-07-28T18:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561252#M8876</link>
      <description>Splunk honor your HASHED_PASSWORD in user-seed.conf if you have done it as you later on said with command "splunk hash-password" and add it to this file. You must do this before starting it in first time.</description>
      <pubDate>Wed, 28 Jul 2021 19:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561252#M8876</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-07-28T19:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561256#M8877</link>
      <description>&lt;P&gt;The only problem I see is that user-seed.conf no longer exists once I start Splunk the first time AND when I look at passwd it does not contain any of the info I put in user-seed.conf so I dont know how to verify the password is actually set as I wanted it to be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how I can verify that? "validate-passwd" doesnt seem to tell me what I need to know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks as always&lt;/P&gt;&lt;P&gt;Todd&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 20:20:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561256#M8877</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2021-07-28T20:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561259#M8878</link>
      <description>&lt;P&gt;If it returns nothing then your password meets requirements. Otherwise it will return an ERROR.&lt;/P&gt;&lt;P&gt;e.g...&lt;/P&gt;&lt;P&gt;splunk validate-passwd '$6$m84'&lt;BR /&gt;ERROR: Password did not meet complexity requirements. Password must contain at least:&lt;BR /&gt;* 8 total printable ASCII character(s).&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 20:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561259#M8878</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2021-07-28T20:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561263#M8879</link>
      <description>&lt;P&gt;The un-hashed password returns nothing which I think means it works?&lt;BR /&gt;I tried the hashed password but it errors but I think it probably should right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 20:58:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561263#M8879</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2021-07-28T20:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561314#M10195</link>
      <description>&lt;P&gt;This works on our ansible scripts&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Security/Secureyouradminaccount" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Security/Secureyouradminaccount&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And as it was said earlier splunk remove that user-seed.conf file after successful start. You could test it e.g. by&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk list tcp&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; and give the user and it's password. If it works it give you an answer for that query.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 07:51:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561314#M10195</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-07-29T07:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561372#M10457</link>
      <description>&lt;P&gt;If your hashed password threw errors then it either does not meet complexity requirements or you need to enclose it within tick marks.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 13:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/561372#M10457</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2021-07-29T13:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/684923#M13827</link>
      <description>&lt;P&gt;How do you implement this using ansible playbook? I'm also stuck with this process of accepting the license in Splunk. I'm using user-seed.conf but it couldn't access the src path since I'm using gitlab as my repository.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Generate Splunk Seed Password&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ansible.builtin.set_fact&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;splunk_seed_passwd&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"{{ 'password' | password_hash('sha512') }}"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;register&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;hashed_pwd&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;when&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;splunk_agent_status.rc != 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;-&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Create user-seed.conf file&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ansible.builtin.template&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;dest&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/opt/splunkforwarder/etc/system/local/user-seed.conf&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;owner&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;group&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;mode&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0640&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"{{ item.opt }}"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"{{ item.val }}"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;with_items&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; - {&lt;/SPAN&gt;&lt;SPAN&gt;opt&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'USERNAME'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;val&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'admin'&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; - {&lt;/SPAN&gt;&lt;SPAN&gt;opt&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'HASHED_PASSWORD'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;val&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'{{ hashed_pwd}}'&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;become&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;when&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;splunk_agent_status.rc != 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Apr 2024 00:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/684923#M13827</guid>
      <dc:creator>samyversonco</dc:creator>
      <dc:date>2024-04-22T00:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/685001#M13828</link>
      <description>&lt;P&gt;I have it this way (thanks splunk/ansible-splunk)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;- name: Set admin access via seed
  when: splunk_first_run | bool
  block:

    - name: "Hash the password"
      command: "{{ splunk.exec }} hash-passwd {{ splunk.password }}"
      register: hashed_pwd
      changed_when: hashed_pwd.rc == 0
      become: yes
      become_user: "{{ splunk.user }}"
      no_log: "{{ hide_password }}"

    - name: "Generate user-seed.conf (Linux)"
      ini_file:
        owner: "{{ splunk.user }}"
        group: "{{ splunk.group }}"
        dest: "{{ splunk.home }}/etc/system/local/user-seed.conf"
        section: user_info
        option: "{{ item.opt }}"
        value: "{{ item.val }}"
        mode: 0644
      with_items:
        - {opt: 'USERNAME', val: '{{ splunk.admin_user }}'}
        - {opt: 'HASHED_PASSWORD', val: '{{ hashed_pwd.stdout }}'}
      loop_control:
        label: "{{ item.opt }}"
      when: ansible_system is match("Linux")
      become: yes
      become_user: "{{ splunk.user }}"
      no_log: "{{ hide_password }}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Then those user + pass information is in config file which are per environment etc. on git. All those secrets are saved by ansible-vault, so there is no passwords as plain text on your repository/inventory. You could have as many config files as you are needing. Usually one or more per environment and customer.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 13:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/685001#M13828</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-04-22T13:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/704357#M14213</link>
      <description>This is old question, but I still comment here if someone needs it later.&lt;BR /&gt;When you are using hashed password in user-seed.conf you mast hash it with same splunk.secret string as you have in your new server! If you have hashed it with some other random splunk.secret and in a new server you have something else in splunk.secret those didn't match as hash keys have been different.</description>
      <pubDate>Wed, 13 Nov 2024 23:33:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/704357#M14213</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-11-13T23:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/704359#M14214</link>
      <description>As I said earlier if you want to use hashed password instead of plain text, then you must use same splunk.secret on both nodes.</description>
      <pubDate>Wed, 13 Nov 2024 23:35:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/704359#M14214</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-11-13T23:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting admin credentials in scripted install</title>
      <link>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/746212#M14379</link>
      <description>&lt;P&gt;I don't believe this is correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Splunk uses the&amp;nbsp;splunk.secret&amp;nbsp;file for encrypting and decrypting passwords and other sensitive info in its configuration files. Splunk&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;uses different algorithms for password hashing:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;$6 (SHA-512):&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;This algorithm is used for hashing passwords.&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;$7 (Encryption):&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;This algorithm requires the&amp;nbsp;splunk.secret&amp;nbsp;file for decryption.&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is what makes it portable and useful with automation.&lt;BR /&gt;&lt;BR /&gt;You can generate a password hash using&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;splunk hash-passwd &amp;lt;somePassword&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Then you can run something like this before you start Splunk.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cat &amp;lt;&amp;lt;EOF &amp;gt; $SPLUNK_HOME/etc/system/local/user-seed.conf
[user_info]
USERNAME = admin
HASHED_PASSWORD = $6$TOs.jXjSRTCsfPsw$2St.t9lH9fpXd9mCEmCizWbb67gMFfBIJU37QF8wsHKSGud1QNMCuUdWkD8IFSgCZr5.W6zkjmNACGhGafQZj1
EOF&lt;/LI-CODE&gt;&lt;P&gt;Alternatively you can create and export a user-seed.conf file with the same information, put it in Ansible Vault and then have it placed in $SPLUNK_HOME/etc/system/local as part of the automation&lt;/P&gt;&lt;P&gt;None of the hosts that user-seed.conf is being distributed to have to have the same splunk.secret since it's just hash-matching, not decrypting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 00:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Scripting-admin-credentials-in-scripted-install/m-p/746212#M14379</guid>
      <dc:creator>petejones</dc:creator>
      <dc:date>2025-05-15T00:58:06Z</dc:date>
    </item>
  </channel>
</rss>

