Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Can I change root password via REST API call?

I can change any standard adminstrator account such as :-

# cat password.txt
{"password": "abcde12345"}
# curl -X PUT -H 'Content-Type: application/json' -k -u admin:myadminpassword https://10.125.195.35/mgmt/tm/auth/user/user1 -d@password.txt
{"kind":"tm:auth:user:userstate","name":"user1","fullPath":"user1","generation":0,"selfLink":"https://localhost/mgmt/tm/auth/user/user1?ver=11.5.3","description":"user1","encryptedPassword":"$6$m7camyk5$CYTz/wPljqrGol9DgwZIimbkYBzP6ZJs8kX/Kg5ZNedPIiXWQ63HnDMd0G1yqqqLt3EpTKuyko.uI19ZQBq6B1","partitionAccess":"all","role":"no-access"}

That works fine, but if I use the same command for root :-

# curl -X PUT -H 'Content-Type: application/json' -k -u admin:myadminpassword https://10.125.195.35/mgmt/tm/auth/user/root -d@password.txt
{"code":404,"message":"the \"root\" account may not be modified, the password may be changed with the \"modify auth password\" command","errorStack":[]}

I can obviously use modify auth password in a TMSH shell but I am trying to automate the process.

Any advice appreciated please.

Thanks!

Dave.

0
Rate this Discussion

Replies to this Discussion

placeholder+image