Forum Discussion
dfosborne2_2224
Nimbostratus
Jun 23, 2014Create users for BigIP via REST
Can user accounts be created via REST in BigIP LTM? If so, could someone provide the syntax? Ive dug around and around the API and cannot find it. Assumed either mgmt/tm/ltm/auth or mgmt/tm/sys/ wou...
MichaelatF5
Employee
Nov 03, 2015To get this to work in v12, I had to take an extra step.
$jsonuser = @"
{
"name": "xadmin",
"password": "pass@word1",
"role": "admin",
"shell": "tmsh",
"partitionaccess": [ {
"name": "all-partitions",
"role": "admin"
}
]
}
"@
$rolejson = @"
{
"partitionAccess": [
{
"name": "all-partitions",
"role": "admin"
}
]
}
"@
I could set partition with a POST, but not ROLE. So I had to use the following:
curl -sk -u "admin:admin" 'https://10.0.0.5/mgmt/tm/auth/user' -X POST -d $o -H "Content-Type: application/json"`
curl -sk -u "admin:admin" 'https://10.0.0.5/mgmt/tm/auth/user/xadmin' -X PATCH -d $rolejson -H "Content-Type: application/json"Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects