Forum Discussion
Modifying Auth TACACS config with Python or REST
Is it possible to use Python SDK or the REST API to change the TACACS+ configuration? I am running 11.5.3 and am having trouble finding documentation on either the REST calls themselves or how to script the calls using Python.
Ultimately I'll need to change a couple hundred vCMP hosts, LTM's and GTM's to point to a new TACACS+ server. I wanted to write a quick pythons script to look through my devices something like this...
for loadBalancer in loadBalancers:
mgmt = ManagementRoot(loadBalancer['DeviceName'], username, password)
tacacs = mgmt.tm.auth.tacacs.modify(\
name="system-auth",\
description="new tacacs server",\
protocol="ip",\
secret="$M$*******************",\
servers="{ 10.10.10.1 10.10.10.2 }",\
service="ppp"\
)
Thanks in advance for any help!
Jeff
- Eric_Flores_131Cirrostratus
Jeff, I have not used the SDK before, but have you been able to make the config change in TMSH ? If you can do it in TMSH most of the time you can do things in REST. The only thing that might cause issues is how the secret is passed as an argument.
- Jeff_42386Nimbostratus
Yes, I was having that problem as well that the secret couldn't be decrypted. I ended up getting by it escaping special chars with '/'.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com