Use templates to delete local user in PMP

Can a template be used to a user in PMP radios?

I know how to change a password of an existing user, or change permission levels, but haven’t found a way to delete a user.

Thanks

The “accounts” parameter is an array so you might be able send the array in a template with all the accounts except the one you want to delete. I haven’t tried this myself so I can’t say for sure if the “accounts” array is copied completely as-is or if it only updates the accounts provided.

In other words, if your accounts looks like this when you view the configuration:

{
 "userParameters": {
   "accounts": [
    {
     "userName": "admin",
     "level": 3,
     "readOnly": false,
     "passwordEncrypted": "54e06861bcf9710630513dadefbf7ff8"
    },
    {
     "userName": "delete_me",
     "level": 3,
     "readOnly": false,
     "passwordEncrypted": "3e8b356e3655b07b8570ca7d9debc0bf"
    }
   ]
  }
}

Send this in a template to delete the “delete_me” account.

{
 "userParameters": {
   "accounts": [
    {
     "userName": "admin",
     "level": 3,
     "readOnly": false,
     "passwordEncrypted": "54e06861bcf9710630513dadefbf7ff8"
    }
   ]
  }
}

1 Like

I had an error in my template. Thanks for the fast response!

1 Like