Hi All;

 

With your help i have managed to get Radius to do what i needed, thanks.

 

Basically i have placed the following into the sites-available/default file on 
the authorize and accounting areas:

 

if(User-Name){

        if ("%{User-Name}" =~ /^(.{6,32})(@{1})(.{17})$/){
                        update request {
                                User-Name := "%{1}"
                                Realm := "%{3}"
                        }
        }

        else {
                        reject
        }
}


The Regex will allow:


Usernames from 6 to 32 characters;
Only one @ sign, and
32 Chars for the MAC Address
 

Users without the @ MAC_ADDRESS will be dropped.

 

With that REGEX true the Username and Realm are updated respectively on my 
MySQL DB.

 

Next time anybody is around Windsor UK, let me know (email at the top) i'll 
treat you for a pint(s) of Stella and a Kebab

 

Thanks again

 

Lucio
                                          
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to