How to add/create local user password directly via CLI?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

How to add/create local user password directly via CLI?

Not applicable

PA500, test unit running PANOS 3.1.4

When I enter a local user via the GUI, the corresponding XML in the configuration file is as follows:

<shared>

    <local-user-database>
      <user>
        <entry name="testuser">
          <phash>$hashvalue$</phash>
        </entry>
      </user>

...

I can add the username without issue, but is there a way to enter in the password directly?  Or do I have to hash it manually and then add the hash value via the CLI?  Which hash is used?  I tried running Hashcalc against the above testuser's original password, but came up mismatched against the listed <phash> value in the config using some of the common hashes (MD5, SHA1, SHA256, etc.)

Any thoughts?

Tariq

5 REPLIES 5

L5 Sessionator

Hi Tariq,

You'd need to genrate the password on at least one PAN device and then could copy the hash into different config files.

So based on the above question and XML extract, is the local database on the PA-500 just an XML file?

The config is XML, the logs are held in a proprietary DB

Thanks

James

So migrating the users to a different database in the future would be difficult, right?

Unless there is some export function in the future?

L3 Networker

A little late to the party, but you can create the hash using the openssl command: openssl passwd -1 password

  • 3803 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!