correcting password field via CLI

Hello Guys

I have an issue as I'm usually creating users in user manager with user/password the same as below:

=========================================================================
add customer=admin disabled=no ipv6-dns=:: password=528317212 shared-users=
unlimited username=528317212 wireless-enc-algo=none wireless-enc-key=""
wireless-psk=""

in the last generation, I forgot to add the password as below:

=========================================================================
add customer=admin disabled=no ipv6-dns=:: password="" shared-users=unlimited
username=189948814 wireless-enc-algo=none wireless-enc-key=""
wireless-psk=""


as you can see above the password field is empty, how I can correct this using the CLI via system terminal for ~ "1350" users


Thanks a lot

I can’t say about user manager, but usually it should work something like this:

set [ find customer=admin username=123456789 password="" ] password="verySecretStuff"

Not sure about how to go around 1350 users other than having external script which creates ROS script (with commands like the above) …

Prepare everything in Excel or whatever and then use text functions to create the script.
Or any other text processing tool of your preference.

I once had to move over about 100 DHCP leases based on Mac address from Win DHCP server to RB5009 and used that approach via Excel.
Export from MS Windows DHCP.
Processing text, adding script parts before and after line by line (prepare function for one line and then copy down)
Copy-paste in terminal and done (or use script).

Goes quick enough and usually a lot faster and error-free then doing it manually, especially for 1350 users :laughing:

thanks a lot guys for the great ideas

I have prepare it quickly in ultraedit and then just copy/past to terminal and it is executing it one by one as below:

==========================================================
[admin@MikroTik] /tool user-manager user>
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=172288707 password=“” ] password=“172288707”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=197082238 password=“” ] password=“197082238”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=188276904 password=“” ] password=“188276904”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=189654960 password=“” ] password=“189654960”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=124954051 password=“” ] password=“124954051”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=142182456 password=“” ] password=“142182456”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=168448308 password=“” ] password=“168448308”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=195047455 password=“” ] password=“195047455”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=188744206 password=“” ] password=“188744206”
[admin@MikroTik] /tool user-manager user> set [ find customer=admin username=161243114 password=“” ] password=“161243114”



it works pretty fine.

Thanks again

Observation:
user passwd the same as user name ? Then it could just as well be kept blank. Gives the same level of security.

No, not the same level. It keeps the attacker out for another 100ms or so. I hope this is just a sample TBH :smiley: