Community discussions

MikroTik App
 
User avatar
leostereo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Thu Oct 18, 2012 11:36 pm
Location: mendoza , argentina
Contact:

hotspot basic questions

Tue Nov 17, 2020 6:37 pm

Hi guys.
I would like to control hotspot using the api.
I want to add / remove users without user and password.
This is what I have so far:
Option1 , use trial users.
This works ok when login from web page (login.html) , but can not get it working on the cli.
[admin@oficina] > /ip hotspot active login  mac-address=T-00:16:FB:CB:2A:46 ip=50.1.1.197
invalid value of mac-address, mac address required
[admin@oficina] > 
[admin@oficina] > /ip hotspot active login  user=00:16:FB:CB:2A:46  mac-address=00:16:FB:CB:2A:46 ip=50.1.1.197
invalid username or password
[admin@oficina] > /ip hotspot active login  user=T-00:16:FB:CB:2A:46  mac-address=00:16:FB:CB:2A:46 ip=50.1.1.197
invalid username or password
Option2
Create a generic user / pass and reutilize this credentials like:
[admin@oficina] > /ip hotspot user reset-counters                                                                 
[admin@oficina] > /ip hotspot active login user=user1 password=user123 mac-address=C0:17:4D:B3:F7:1F ip=50.1.1.199
[admin@oficina] > /ip hotspot active login user=user1 password=user123 mac-address=60:8F:5C:B8:75:4F ip=50.1.1.195
[admin@oficina] > /ip hotspot active login user=user1 password=user123 mac-address=00:16:FB:CB:2A:46 ip=50.1.1.197
Is this possible ?

This seems to be working but dont know if it is a good practice.
perhaps there is a better way to do it.
Any idea would be great.
Other issue:
It is not clear why Address displayed at the Active tab are not same I used prevously , take a look:
hot2.png
Can some one explain? why active user shows differents ips ?

Thanks!!
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 12 guests