help mrz

hi mrz any script to migrate hotspot users to userman users

you could write a script to parse hotspot users and run the command to import users into userman. It should be fairly trivial.

how?

it’s easy, for example get username and password and create user in usermanager

:foreach i in=[/ip hotspot user find] do={
   :local user [/ip hotspot user get $i name];
   :local pass [/ip hotspot user get $i password];
   /tool user-manager user add name=$user password=$pass subscriber=admin
}

thanks and what about for mac address and ip

:foreach i in=[/ip hotspot user find] do={
   :local user [/ip hotspot user get $i name];
   :local pass [/ip hotspot user get $i password];
   :local ip [/ip hotspot user get $i address];
   /tool user-manager user add name=$user password=$pass ip-address=$ip subscriber=admin
}

user-manager doesn’t have a field for MAC addresses.

Hope that helps,
Felix

userman v4b4 contains caller ID (mac address)

Then add

:local mac [/ip hotspot user get $i mac-address];

and change the insert

/tool user-manager user add name=$user password=$pass ip-address=$ip whatever-property-holds-the-mac-address=$mac subscriber=admin



/tool user-manager user add name=$user password=$pass ip-address=$ip caller-id=$mac subscriber=admin

The caller-id field also works when tested on 3.25 - 3.28.