<?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 Scripts Repository Password Reset in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84616#M4835</link>
    <description>&lt;P&gt;While testing this in the lab I've noticed some unique handling of a hashed password when using scripts repository.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Temp password was also created on lab gateway using /sbin/grub-md5-crypt command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the script is loaded as a one-time script, it looks like this;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clish -c "lock database override"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clish -c&amp;nbsp;"set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After this was completed, I was unable to login. While looking at the output of "show configuration user" one would notice that the hash is not what was passed from the script via SmartConsole Scripts Repository. I've tested this also sending the same password-hash via CLI, in the same format that SmartConsole script would, and it does the same thing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c&amp;nbsp;"set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c "show configuration" | grep "mike password-hash"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set user mike password-hash .phv0.yVp72SnMB45g.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I take the same command and use it in the shell, the output is then correct and the password works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hq-fw-lab-test-01a&amp;gt; set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c "show configuration" | grep "mike password-hash"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add, using cprid_util from my provider with the command below, I am able to set the password with no problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$CPDIR/bin/cprid_util -server X.X.X.200 -verbose rexec -rcmd /bin/clish -s -c 'set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c "show configuration" | grep "mike pass"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use Scripts Repository in SmartConsole to pass a hashed password and reset the admin/expert password or even simply add a new user as it seems that wouldn't work either given the symptoms observed here.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2020 19:37:57 GMT</pubDate>
    <dc:creator>Mike_A</dc:creator>
    <dc:date>2020-05-08T19:37:57Z</dc:date>
    <item>
      <title>Scripts Repository Password Reset</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84616#M4835</link>
      <description>&lt;P&gt;While testing this in the lab I've noticed some unique handling of a hashed password when using scripts repository.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Temp password was also created on lab gateway using /sbin/grub-md5-crypt command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the script is loaded as a one-time script, it looks like this;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clish -c "lock database override"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clish -c&amp;nbsp;"set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After this was completed, I was unable to login. While looking at the output of "show configuration user" one would notice that the hash is not what was passed from the script via SmartConsole Scripts Repository. I've tested this also sending the same password-hash via CLI, in the same format that SmartConsole script would, and it does the same thing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c&amp;nbsp;"set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c "show configuration" | grep "mike password-hash"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set user mike password-hash .phv0.yVp72SnMB45g.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I take the same command and use it in the shell, the output is then correct and the password works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hq-fw-lab-test-01a&amp;gt; set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c "show configuration" | grep "mike password-hash"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add, using cprid_util from my provider with the command below, I am able to set the password with no problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$CPDIR/bin/cprid_util -server X.X.X.200 -verbose rexec -rcmd /bin/clish -s -c 'set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@hq-fw-lab-test-01a:0]# clish -c "show configuration" | grep "mike pass"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set user mike password-hash $1$X.phv0$edJcbh4M.yVp72SnMB45g.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use Scripts Repository in SmartConsole to pass a hashed password and reset the admin/expert password or even simply add a new user as it seems that wouldn't work either given the symptoms observed here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 19:37:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84616#M4835</guid>
      <dc:creator>Mike_A</dc:creator>
      <dc:date>2020-05-08T19:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts Repository Password Reset</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84775#M4846</link>
      <description>The $1$X is being interpolated as a variable.&lt;BR /&gt;I think if you use single quotes around the command you send via clish -c, it shouldn't be treated that way.</description>
      <pubDate>Mon, 11 May 2020 00:03:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84775#M4846</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-05-11T00:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts Repository Password Reset</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84801#M4848</link>
      <description>&lt;P&gt;second that&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 07:27:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84801#M4848</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-05-11T07:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts Repository Password Reset</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84825#M4849</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp;I thought I had tried that, apparently not. This worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 11:02:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84825#M4849</guid>
      <dc:creator>Mike_A</dc:creator>
      <dc:date>2020-05-11T11:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts Repository Password Reset</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84832#M4850</link>
      <description>&lt;P&gt;Good to know this is resolved&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 12:59:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Scripts-Repository-Password-Reset/m-p/84832#M4850</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-05-11T12:59:31Z</dc:date>
    </item>
  </channel>
</rss>

