Edit User-Name based on regex

Jonathan Davis jonathan at prioritycolo.com
Mon Mar 27 11:33:32 UTC 2023


The example in the docs for regex is a username comparison (first google hit), and there are many examples all over stackexchange of mac address regexes.

Are you stuck on where to do the username comparison, or how to remove the :'s from
the string or ? 

> On Mar 27, 2023, at 6:20 AM, ANGEL LUIS MATEO MARTINEZ <amateo at um.es> wrote:
> 
> Hello,
> 
> I have a scenario where I need to modify User-Name, before any AAA operation, based on a regex substitution. To be precise, the users are sending a MAC as the username, in the form "00:11:22:33:44:55" and I need to transform this to "001122334455".
> 
> This may be a silly question, but I haven't found how to do it. Is there any way to do it? Thank you.
> 
> --
> Angel L. Mateo Martínez
> Sección de Telemática
> Área de Tecnologías de la Información y las Comunicaciones Aplicadas (ATICA)
> http://www.um.es/atica
> Tfo: 868889150
> Fax: 868888337
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list