Creating an administrator account on Panorama using Pan-OS Python SDK kit

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating an administrator account on Panorama using Pan-OS Python SDK kit

L0 Member

Hey guys,


Hope all of you are doing well.


I recently started using the panos python module to interact and automate some of the things I'm doing on Panorama GUI. I wanted to know how to add a administrator account using the device.administrator class. This is the code I have written as of now:


from panos.panorama import Panorama
from panos import objects
from panos import device

# connect to panorama
pano = Panorama('ip_addr', 'name', 'password')

myDevice = device.Administrator(name = 'testcase', authentication_profile = 'organization_based', device_admin_read_only = True, password_hash = 'adminaccounttest1')




Thanks a lot!


L5 Sessionator

The password hash has to be created using the function:


Alternatively, you can use this to create the password and use the value returned as the panos.device.Administrator.password_hash value:


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!