Community discussions

MikroTik App
 
User avatar
arturportella
newbie
Topic Author
Posts: 46
Joined: Wed Oct 30, 2013 3:16 pm

How to change inserted login PPP/Hotspot string to another one?

Wed Feb 01, 2017 4:26 pm

Hello everyone!

I've readed a lot about scripting, but I still cant figure a way to get one thing working. The goal is to get inserted user login from hotspot or ppp authentication and put it in router as "uppercase". Let me try to explain what is going on.
Today I work with about 1500 users on PPPoE/Hotspot mixed mode, and they use RADIUS to get a login... I actually use a control software to drop connection and block users, but the issue is that this software came allowing users to use mixed string in their login name. So doesn't matter if my customer uses potato, PoTaTo, POTATO, whatsoever, my Radius database allow it to login in this way.
The problem is that Mikrotik only disconnects users from Radius requests if they matches exactly the way they where registered, so they log in in their own way, but disconnection doesn't work if my customer uses mixed case in their login. All my users where registered in UPPERCASE (about 1500 users ladies and gentleman). Most of them don't know how to configure PPPoE connections on their equipment, so rejecting mixed case in radius would be a very big problem (dropping everyone using the "wrong way" of authentication).

I have a function to do a case convertion already working, like so:
put [$toupper "PoTaTo"]
POTATO
Amazing, isn't?

There is a way to get the user call from station and "convert" his login to uppercase in the server using this script? And why not? hahahah...

Thanks in advance... :D