Community discussions

MikroTik App
 
Sergioz
just joined
Topic Author
Posts: 14
Joined: Mon Apr 11, 2005 10:17 pm
Location: Moroocco from Côte d'Ivoire

Script for hotspot users creation

Mon Apr 11, 2005 10:37 pm

hi!
I have just set up my hotspot gateway with MT router OS version 2.8.26
Evry things work very well.
But when i tried to create users for prepaid card ... problems begun!!
Indeed i noticed that the only way to create users is just to create them one by one :shock: !!!!! incredible!!!
Iam sure i have missed some think in users configurations for hostpot.

i so tried to see if scripts can solve this problem ; there i found that :first is not so easy to work with string to create users like "user$i" where $i is from 1 to 100.

second it seems like there in no random function in script to generate for each user an random password.

I sure i have missed some thing

could you give me ideas abouit this topic please is quite urgent
any help would be realy appreciated
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Tue Apr 12, 2005 11:02 am

:for i from 1 to 100 do={/ip hotspot user add name=("user" . $i) ...}
instead of ... specify all other necessary parameters.
No, there aren't random number generation in scripts. But you can use some formula including $i value to generate such number.

Edgars
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 986
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Tue Apr 12, 2005 5:08 pm

We will think about adding "random" feature in v2.9.
 
Sergioz
just joined
Topic Author
Posts: 14
Joined: Mon Apr 11, 2005 10:17 pm
Location: Moroocco from Côte d'Ivoire

Thanks for help

Wed Apr 13, 2005 3:44 am

Thank you for help the small script does the job.
Really good idea for next versions that is the random feature.
But it is not enough ... Why not thnk about a kind of simple HotSpot business configurator like Alepo RBS billing system i dont think that will be hard for you to implement in RouterOS lets say a 2.9 HV (HotSopt Version) . Including a very important feature like billing handler and report. Dont forget to implement a way to export more easyly the users list with all necessary details like Uptime; limit time for printing on prepaid card for instance...
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 986
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Wed Apr 13, 2005 10:50 am

Why not to use MT HotSpot manager?
http://www.mikrotik.com/download.html#hotspot

Eugene
 
Sergioz
just joined
Topic Author
Posts: 14
Joined: Mon Apr 11, 2005 10:17 pm
Location: Moroocco from Côte d'Ivoire

you know why not...

Thu Apr 14, 2005 1:28 pm

Because its not integrated to the soft; i mean something local for standalone system like Nomadix all in one box hostpot gateway. Router OS is more features enhanced and more more power full than nomadix product believe me. It needs to full fill all the range of existing features in this domain i think.