<?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: Script admin password change when first admin login requires password change in Security</title>
    <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372727#M12709</link>
    <description>&lt;P&gt;You could do a fresh install, change the admin password, and copy the &lt;CODE&gt;$SPLUNK_HOME/etc/passwd&lt;/CODE&gt; file contents to put in place (even before installing Splunk) on the image.&lt;/P&gt;

&lt;P&gt;Also, you can disable the password change prompt by creating the file (&lt;CODE&gt;touch&lt;/CODE&gt; it): &lt;CODE&gt;$SPLUNK_HOME/etc/.ui_login&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The above tidbit courtesy of a &lt;A href="https://answers.splunk.com/answers/102966/how-can-i-disable-password-change-request-at-first-time-login-to-splunkweb.html"&gt;past answers question&lt;/A&gt;. It's not actually changing the password that removes the prompt to change your password; it's logging in to the UI the first time.  &lt;CODE&gt;touch&lt;/CODE&gt;ing the &lt;CODE&gt;.ui_login&lt;/CODE&gt; button will make it seem like you've already logged in.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Feb 2018 01:53:04 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-02-11T01:53:04Z</dc:date>
    <item>
      <title>Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372726#M12708</link>
      <description>&lt;P&gt;I'm scripting automated provisioning of the Splunk marketplace AMI and I can't figure out how to script the required initial password change so that I can perform other scripted steps.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sudo /opt/splunk/bin/splunk edit user admin -password '&amp;lt;new password&amp;gt;' -auth admin:&amp;lt;initial pass&amp;gt;
The administrator requires you to change your password.
Please enter a new password:
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Short of writing an expect script (please no), is there a way to get past this?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 01:24:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372726#M12708</guid>
      <dc:creator>bdruth</dc:creator>
      <dc:date>2018-02-11T01:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372727#M12709</link>
      <description>&lt;P&gt;You could do a fresh install, change the admin password, and copy the &lt;CODE&gt;$SPLUNK_HOME/etc/passwd&lt;/CODE&gt; file contents to put in place (even before installing Splunk) on the image.&lt;/P&gt;

&lt;P&gt;Also, you can disable the password change prompt by creating the file (&lt;CODE&gt;touch&lt;/CODE&gt; it): &lt;CODE&gt;$SPLUNK_HOME/etc/.ui_login&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The above tidbit courtesy of a &lt;A href="https://answers.splunk.com/answers/102966/how-can-i-disable-password-change-request-at-first-time-login-to-splunkweb.html"&gt;past answers question&lt;/A&gt;. It's not actually changing the password that removes the prompt to change your password; it's logging in to the UI the first time.  &lt;CODE&gt;touch&lt;/CODE&gt;ing the &lt;CODE&gt;.ui_login&lt;/CODE&gt; button will make it seem like you've already logged in.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 01:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372727#M12709</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-11T01:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372728#M12710</link>
      <description>&lt;P&gt;The image has Splunk installed and it starts when the AMI launches. Not sure if replacing etc/passwd would set the 'user has changed his password' flag - the AMI, when it boots, already sets the initial password (it's the instance ID). But, I can try and report back.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 03:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372728#M12710</guid>
      <dc:creator>bdruth</dc:creator>
      <dc:date>2018-02-11T03:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372729#M12711</link>
      <description>&lt;P&gt;Edited based on your comment that what's important is no longer being prompted to change your password.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 03:36:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372729#M12711</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-11T03:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372730#M12712</link>
      <description>&lt;P&gt;Actually - the &lt;CODE&gt;.ui_login&lt;/CODE&gt; trick doesn't seem to work anymore. That was the first thing I came across, too. I did however figure out what does work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 04:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372730#M12712</guid>
      <dc:creator>bdruth</dc:creator>
      <dc:date>2018-02-11T04:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372731#M12713</link>
      <description>&lt;P&gt;Thank you @micahkemp for pointing at &lt;CODE&gt;$SPLUNK_HOME/etc/passwd&lt;/CODE&gt; - there's a flag on the admin user, &lt;CODE&gt;force_change_pass&lt;/CODE&gt; - removing this and restarting the splunk service will allow the CLI to change the password (or do anything else) without prompting for a password change.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  sudo -u splunk sed -i -e 's/force_change_pass$//' /opt/splunk/etc/passwd
  sudo service splunk restart
  sudo /opt/splunk/bin/splunk edit user admin -password '&amp;lt;new pass&amp;gt;' -auth admin:&amp;lt;initial pass&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As of 7.0.0, this works.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 04:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372731#M12713</guid>
      <dc:creator>bdruth</dc:creator>
      <dc:date>2018-02-11T04:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372732#M12714</link>
      <description>&lt;P&gt;One additional comment - adding the &lt;CODE&gt;$SPLUNK_HOME/etc/.ui_login&lt;/CODE&gt; &lt;EM&gt;does&lt;/EM&gt; prevent the UI from providing the assistive info re: what the initial login is when you hit the login page the first time.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 04:12:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372732#M12714</guid>
      <dc:creator>bdruth</dc:creator>
      <dc:date>2018-02-11T04:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372733#M12715</link>
      <description>&lt;P&gt;So if you were planning on deploying a single password (as in, not different per machine), copying a pre-configured &lt;CODE&gt;etc/passwd&lt;/CODE&gt; would have accomplished this as well, right?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 04:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372733#M12715</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-11T04:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script admin password change when first admin login requires password change</title>
      <link>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372734#M12716</link>
      <description>&lt;P&gt;@bdruth, what was the solution you found if you dont mind sharing?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 21:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Script-admin-password-change-when-first-admin-login-requires/m-p/372734#M12716</guid>
      <dc:creator>rbendik</dc:creator>
      <dc:date>2019-11-01T21:52:37Z</dc:date>
    </item>
  </channel>
</rss>

