Using User Manager web interface, I can add batch username and password. But, how can do that from terminal (CLI)? My purpose is adding command on my php api script to generate mikrotik hotspot username and password. Just find out the command from what user manager do when we create batch (random) username and password.
sorry for my bad english
To create a user with random password you can use this:
/tool user-manager user add customer=admin name="user01" random-password=yes
To assign a profile to the newly created user:
/tool user-manager user create-and-activate-profile user01 customer=admin profile=default
If you want to generate a random username you’ll have to randomize it from your php script and replace my user01 with your random string on both commands.
test
how can i create random username?? plz help