Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

Mohanish_169493's avatar
Mohanish_169493
Icon for Nimbostratus rankNimbostratus
Sep 30, 2015

Need script to create users on F5 BIGIP

Hi,

 

I need script to create users on F5 BIGIP. I have recently got request to create 100 about users on BIGIP. Thought if this task could be automated via scripting. Since creating manually would be Herculean task. I would be using local authentication.

 

2 Replies

  • you can create a user with command:

     

    tmsh create auth user `Username` password `Pass` partition-access all role admin shell bash
    

     

  • Hello,

    Are your F5 appliances v11.5.1 or newer? If so, you could use the iControlREST API for this task. If older, then you will have to use the legacy iControl or a SSH-based script which runs the TMSH commands on-appliance for creating the users. If you go with SSH-based script, I recommend Python Fabric library as it will make SSH session I/O management a lot easier.

    Coming back to v11.5.1 or newer. If possible go with the iControlREST API since it will be the cleanest automation solution. SSH-based scripts are often referred to as "dirty workarounds". In regards to exact API call for creating new users, you can use the code below; build a for-loop in your favourite scripting language to go over all F5 appliances.

     

    curl -sk -u 'admin:admin' -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/auth/user -d '{"name":"newuser","password":"newuserpass","role":"admin","partition-access":"all","shell":"bash"}'

     

    Good luck!