<?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: Mass creating local-db users from CLI in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237580#M68066</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/52796"&gt;@LukeBullimore&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Do you want to paste all the user from a pre-generated csv or something like that or you you use a script anyway?&amp;nbsp;&lt;/P&gt;&lt;P&gt;But even if you want to pre-generate the hashes I assume you can do that without the request password-hash command, you just need to have the salt also in the string that you use as password hash when you henerate the user. I did not test it but if you use the same format as the request command generates ...&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 13:41:26 GMT</pubDate>
    <dc:creator>Remo</dc:creator>
    <dc:date>2018-10-29T13:41:26Z</dc:date>
    <item>
      <title>Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237553#M68056</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We wish to add a batch of users to the local database, I'm just wondering if anyone has had experience with scripting this or doing this in batch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the command "&lt;SPAN&gt;set shared local-user-database user testuser" it requires separate user input to add the password so this is out of the question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I thought the command "set shared local-user-database user testuser &amp;lt;passwordhash&amp;gt;" would be the solution, but what hash are we putting here? I presume the hashes aren't salted so what hashing algorithm is used?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How have people done this before? My only other thinking was via the XMLAPI&amp;nbsp;but we really want to do via the CLI if possible, which I'm sure it is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Luke.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 11:20:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237553#M68056</guid>
      <dc:creator>LukeBullimore</dc:creator>
      <dc:date>2018-10-29T11:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237568#M68058</link>
      <description>&lt;P&gt;Hi Luke&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the API you would probably have the same questions. This link should help you in your situation (with an additional command and the algorithms used):&amp;nbsp;&lt;A href="https://www.paloaltonetworks.com/documentation/81/pan-os/web-interface-help/device/device-local-user-database-users" target="_blank"&gt;https://www.paloaltonetworks.com/documentation/81/pan-os/web-interface-help/device/device-local-user-database-users&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 11:51:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237568#M68058</guid>
      <dc:creator>Remo</dc:creator>
      <dc:date>2018-10-29T11:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237572#M68061</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/16592"&gt;@Remo&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perfect! Many thanks for the response, MD5 hashing works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Luke.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 12:06:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237572#M68061</guid>
      <dc:creator>LukeBullimore</dc:creator>
      <dc:date>2018-10-29T12:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237577#M68063</link>
      <description>&lt;P&gt;I did this recently for "mass creating", and MD5 isn't needed, but you do need to break it up into two steps if you want a salted hash.&lt;/P&gt;&lt;P&gt;The &lt;A title="Local User Database" href="https://www.paloaltonetworks.com/documentation/81/pan-os/web-interface-help/device/device-local-user-database-users" target="_blank"&gt;article linked above&lt;/A&gt; includes the command 'request password-hash', which is half of how you get this done in the CLI (without API).&amp;nbsp;&amp;nbsp; Note that, unlike MD5, if you test the same username/password, you'll get different output from the command, because the salt changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;admin&amp;gt; set cli pager off&lt;BR /&gt;admin&amp;gt; request password-hash username test password bogus&lt;BR /&gt;&lt;BR /&gt;$1$cllheyno$jz2SsGvrE2Gii1xeAVT2d/&lt;BR /&gt;&lt;BR /&gt;admin&amp;gt; request password-hash username test password bogus&lt;BR /&gt;&lt;BR /&gt;$1$xiawogxo$yKAz1IFTDotiOnXIqu9z2.&lt;BR /&gt;&lt;BR /&gt;admin&amp;gt; request password-hash username test password bogus&lt;BR /&gt;&lt;BR /&gt;$1$sumoabmi$tGZkhTpj536dlrfkkaowi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you take the hashes and set it in the configure-mode CLI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;admin&amp;gt; set cli config-output-format set&lt;BR /&gt;admin&amp;gt; configure&lt;BR /&gt;admin# set shared local-user-database user test phash $1$xiawogxo$yKAz1IFTDotiOnXIqu9z2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or in Panorama:&lt;BR /&gt;admin# set template YOUR_TEMPLATE config shared local-user-database user test phash $1$sumoabmi$tGZkhTpj536dlrfkkaowi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 12:53:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237577#M68063</guid>
      <dc:creator>JW6224</dc:creator>
      <dc:date>2018-10-29T12:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237578#M68064</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/99005"&gt;@JW6224&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much for that insight; good to know this method also salts the hash too. I presume though this hash is still MD5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The two-step process does take away from the automation that we were looking for, for the trade-off that you get a salted hash. I guess with anything like this, you must weigh up convenience vs the security aspect &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Again,&lt;/P&gt;&lt;P&gt;Luke.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 13:24:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237578#M68064</guid>
      <dc:creator>LukeBullimore</dc:creator>
      <dc:date>2018-10-29T13:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237580#M68066</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/52796"&gt;@LukeBullimore&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Do you want to paste all the user from a pre-generated csv or something like that or you you use a script anyway?&amp;nbsp;&lt;/P&gt;&lt;P&gt;But even if you want to pre-generate the hashes I assume you can do that without the request password-hash command, you just need to have the salt also in the string that you use as password hash when you henerate the user. I did not test it but if you use the same format as the request command generates ...&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 13:41:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237580#M68066</guid>
      <dc:creator>Remo</dc:creator>
      <dc:date>2018-10-29T13:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237582#M68068</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/16592"&gt;@Remo&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea was to have everything pre-made in a csv&amp;nbsp;and then dump it into the CLI, using some delay in between commands using Tera Term or something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You did get me a bit confused with your comment "&lt;SPAN&gt;&amp;nbsp;you just need to have the salt also in the string that you use as password hash when you henerate the user." The only parameters that I thought you need for the command was the password hash and the username?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Luke.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 13:53:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237582#M68068</guid>
      <dc:creator>LukeBullimore</dc:creator>
      <dc:date>2018-10-29T13:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237595#M68074</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/52796"&gt;@LukeBullimore&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I did confuse myself too &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Need to test a little before I write wrong things ...&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 14:40:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237595#M68074</guid>
      <dc:creator>Remo</dc:creator>
      <dc:date>2018-10-29T14:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237707#M68105</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/52796"&gt;@LukeBullimore&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wasn't able to find out how exactly the salts and hashes are encoded in the output of the "request password-hash" command. Obviously it is not the plain MD5 hash, there is some additional encoding.&lt;/P&gt;&lt;P&gt;With this example:&lt;/P&gt;&lt;PRE&gt;$1$sumoabmi$tGZkhTpj536dlrfkkaowi&lt;/PRE&gt;&lt;P&gt;$1 probably is the algorithm, $sumoabmi seems to be the (encoded) salt and $tGZkhTpj536dlrfkkaowi is the salted and hashed password. ( &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/7608"&gt;@reaper&lt;/a&gt;: do you know how to get the output as provided by the command "request password-hash"?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the conclusion is, I think you cannot simply enter a hash with the create user command, you probably need to use the request command. If your interessted I could provide a little powershell script that will take the values from a CSV and then create the users for you over the XML API...&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 21:52:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/237707#M68105</guid>
      <dc:creator>Remo</dc:creator>
      <dc:date>2018-10-29T21:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Mass creating local-db users from CLI</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/382350#M89839</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any model script or something where I can run the script and it will create all the users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to here and I couldn't get the clarity so I just wanted to know how to do the bulk user creation in Plao Alto.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 15:06:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/mass-creating-local-db-users-from-cli/m-p/382350#M89839</guid>
      <dc:creator>SubaMuthuram</dc:creator>
      <dc:date>2021-01-27T15:06:23Z</dc:date>
    </item>
  </channel>
</rss>

