- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-05-2023 07:58 AM
Hello,
I have an Ansible playbook developed to automatically change the password of the account used by Palo Alto to connect to an Active Directory. On the Palo Alto side, Integrated User-ID and an LDAP Server Profile is configured to use this password.
The task to change the Integrated User-ID user works fine:
paloaltonetworks.panos.panos_config_element:
provider: "{{ device }}"
xpath: /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/user-id-collector/setting
<wmi-password>MyPassword</wmi-password>
However, the task to change the LDAP password always fails:
paloaltonetworks.panos.panos_config_element:
provider: "{{ device }}"
xpath: /config/shared/server-profile/ldap/entry[@name='ldaptest']
'<bind-password>MyPassword</bind-password>'
The error is : parser.feed(text)\nxml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 6\n"
I also tried with a vsys Server Profile, but the problem is the same.
Hence my questions:
How can I check what is causing the issue? Where is this line 1, column 6\n" coming from ?
Why is Palo Alto reacting differently when trying to change the value of user-id-collector compared to an LDAP Server Profile
For the sake of testing, I tried to make my modification through the API, and it works:
Thank you in advance.
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!