Help pls: How to strip REALM but insert it from a username at MAC onto an MySQL DB

Alan DeKok aland at deployingradius.com
Sun Jan 24 17:04:42 CET 2010


Lucio Godoy wrote:
> I would like to continue with the same authentication method by when the
> user is authenticating they will include their MAC address as such:
>  
> username @ MAC_ADDRESS
>  
> Freeradius is to strip the MAC_ADDRESS, then insert onto the field
> "Realm" on the table "radacct" and then authenticate the user normally
> via the username+password combination.

  Use regexes.

> I have researched and have not found a way to implement this.

  See "man unlang".  Match the User-Name with a regex, split it into two
fields, and update any attribute lists you believe to be necessary.

  Alan DeKok.



More information about the Freeradius-Users mailing list