<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi All;<BR>
<BR>
With your help i have managed to get Radius to do what i needed, thanks.<BR>
<BR>
Basically i have placed the following into the sites-available/default file on the authorize and accounting areas:<BR>
<BR>
if(User-Name){<BR>
if ("%{User-Name}" =~ /^(.{6,32})(@{1})(.{17})$/){<BR> update request {<BR> User-Name := "%{1}"<BR> Realm := "%{3}"<BR> }<BR> }<BR>
else {<BR> reject<BR> }<BR>}<BR><BR>
The Regex will allow:<BR>
<UL>
<LI>Usernames from 6 to 32 characters;</LI>
<LI>Only one @ sign, and</LI>
<LI>32 Chars for the MAC Address</LI></UL>
<BR>
Users without the @ MAC_ADDRESS will be dropped.<BR>
<BR>
With that REGEX true the Username and Realm are updated respectively on my MySQL DB.<BR>
<BR>
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<BR>
<BR>
Thanks again<BR>
<BR>
Lucio<BR> <br /><hr />We want to hear all your funny, exciting and crazy Hotmail stories. <a href='http://clk.atdmt.com/UKM/go/195013117/direct/01/' target='_new'>Tell us now</a></body>
</html>