How to add users to the Internal DB using a Windows Batch file ?

Aruba Employee
Aruba Employee

This article will have a focus on adding users to the Internal Database of the controller using a Windows Batch file.


There are occasions when we need to add multiple users to the internal database of the controller , but adding too many users manually would be little inconvenient , hence we can do it in a easier way by Assembling the user credentials into a text file and use a script file to add those credentials to the internal database of the controller.




So lets write a script which on executing will open a new PuTTY session to a certain IP Address and have it automatically enter your username for you and add the users to the internal database of the controller , the program that we use for this is  "plink"  which is the command line interface for Putty and can be used in scripts.


Environment : This article applies to Aruba Mobility Controllers running ArubaOS version and above.


Copy the below commands on a notepad and save it as internaldb.bat



C:\plink.exe <username>@<x.x.x.x> -pw <password> <com.txt


 In order to automatically run commands without interaction, the commands you want to run need to be inserted into a text file "com.txt"


local-userdb add username <username1> password <password1>
local-userdb add username  
<username2> password <password2>
local-userdb add username 
<username50> password <password50>


Keep the internaldb.bat , com.txt and plink.exe on the same directory and execute the bat file

open up a command prompt, black screen comes up. Drag and drop your .bat file onto the window. If that doesnt work use cd (change directory) to go to where the file is and then press enter.

Sample :

C:\plink.exe admin@ -pw aruba123 <com.txt

- Use ssh to connect
- Connect with the username admin
- The IP address of the device we are connecting is
- use the password aruba123
- run the commands contained in the file called com.txt that resides in the current directory.

Contents of com.txt file :

local-userdb add username testprog1 password testprog1
local-userdb add username testprog2 password testprog2
local-userdb add username testprog50 password testprog50


Version history
Revision #:
1 of 1
Last update:
‎07-16-2014 01:02 PM
Updated by:
Labels (1)