hi
i am trying to log an users MAC as soon as he gets authenticated via radius
so in hotspot server profile under scripts i have inserted
/tool fetch url=“http://172.30.0.2:81/test-hit.php?mac=user_mac ” keep-result=no mode=http
the php page logs the details
what i want is the user_mac should be replaced with the original MAC of the user who just logged in
Can any one help
Thanks
skot
January 30, 2013, 11:31pm
2
Do you mean hotspot User Profiles ?
Try this:
:local mac [/ip hotspot active get [find user="$user"] mac-address]
/tool fetch url="http://172.30.0.2:81/test-hit.php?mac=$mac" keep-result=no mode=http
this will retrieve all the active users mac
i just want mac of the last logged in user
skot
January 31, 2013, 5:41am
4
That is what the script does.
This part of the code is targeting the single user (wiki - under on-login / on-logout sections):
[find user="$user"]
I tested the script in IP > Hotspot > User Profiles > Scripts > On Login , and it only gets the MAC of the user that just logged in.
ok thanks i will give a try now
no
i tried the script but it did not fetched the mac of user
anyways it fetched the user id and i can manage
but can any one tell me how can i set change dynamic simple queue to set burst from radius command line