Changing Hotspot Passwords Weekly

Hi All,

Thank you in advance for your assistance. I have installed routeros 4.17 in a hotel and the client asked me to use the room numbers as user and one common password. Example:

105 password
106 password, etc.

I’m trying to find a way to change the passwords quickly through the terminal. I’ve tried this:


/ip hotspot user> set 105,106,107,108,112,114,116,117,124,125,126,127,204,205,20
6,207,208,209,210,211,212,214,216,217,218,219,220,221,222,223,224,225,226,227,304,305,306,307,308,30
9,310,311,312,314,316,317,318,319,320,321,322,323,324,325,326,327 password=“password”

When I do it returns:
no such item

I can do this with text based users, but it doesn’t seem to like numerical usernames. Can someone advise me?

Thanks in advance,

Jon

You can use the line number for each user name:

[login@2Frog's HotSpot] > ip hotspot user pri                     
Flags: X - disabled, D - dynamic 
 #   SERVER           NAME          ADDRESS         PROFILE          UPTIME      
 0                        100                                                       0s
 1                        101                                                       0s
 2                        102                                                       0s
 3                        103                                                       0s

Note that user 100’s line number is 0 and user 101’s is line number is 1 and… so on.

You would need enter something like this:

/ip hotspot user set password="password" 0,1,2,3
ip hotspot user set password=pass numbers=[/ip hotspot user find comment="change-pass"]

add a comment to the user: change-pass

and change pass for you password

Use the find function in the script if you want each password to be the same.

/ip hotspot user set [find] password="password"

That will return all user accounts and set their password. Though a better solution for you would likely be to have a back end system that would manage this kind of stuff for you. It’s more a question of scaling, if you only have one location to manage, not a big issue, if you have 4-5 locations and you are growing having something centralized makes a lot more sense.

I agree. I’m very new to Mikrotik, but we have deployed them at 3 properties now. I need to get a back end system built.

Thank you all for your help. /ip hotspot user set password=“password” 0,1,2,3 worked like a champ. I just created a document and stored it, so we can just copy and paste it into the terminal. When I start this backend system, I’m sure I’ll be back to ask for suggestions.

Thank you all again,

Jon

No problem. Just for reference, this is what we use for our back end systems, and it works very well. It may do more than what you are currently looking for, but having the choices are always very nice.
http://www.myinnsite.com/