unificontrol icon indicating copy to clipboard operation
unificontrol copied to clipboard

create_radius_account leaving password blank

Open jondurrant opened this issue 4 years ago • 3 comments

I'm trying to auto provision radius assigned vlan using MAC address. Calling create_radius_account with username and password being same results in blank password. Any suggestions?

jondurrant avatar Feb 21 '21 18:02 jondurrant

@jondurrant Can you provide some details regarding your setup, and in particular what version of the Unifi controller you are running?

nickovs avatar Feb 21 '21 20:02 nickovs

Sorry. Bit more detail on environment: Controller: atag_5.12.66_13102 (Raspberry PI hosted) Client: Python 3.9.1 being called from within Ansible Plugin. Ansible version 2.10.5

Snip of code line: self.controler.create_radius_account(cMac, cMac, 13, 6, vlan=vlanS)

jondurrant avatar Feb 22 '21 07:02 jondurrant

Maybe is related with a typo that I've found trying to create radius accounts. On controller logs: <webapi-259> WARN sanitize - Invalid key exists in Account payload, key=x_passowrd As the correct key is x_password. On unifi.py file at line 53: X_PASSWORD_FIX=fix_arg_names({"password":"x_passowrd"}) Changed to: X_PASSWORD_FIX=fix_arg_names({"password":"x_password"}) And then it worked fine.

josepmendoza avatar Oct 26 '22 07:10 josepmendoza