<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>
 <BR>
I am nearly there, thanks to you all.<BR>
 <BR>
I have created this rule on the file sites-available/default on the authorize section:<BR>
 <BR>
if("%{User-Name}"){<BR><BR>
        if ("%{User-Name}" =~ /^([^@]*)(@([-[:alnum:].]+))?$/){<BR>                        update request {<BR>                                User-Name := "%{1}"<BR>                                Digest-Realm := "%{3}"<BR>                        }<BR>        }<BR>
        else {<BR>                        reject<BR>        }<BR>}<BR><BR>
 <BR>
I am getting the user to authenticate as "user @ MAC_ADDRESS", and the REGEX is doing what is supposed to do, but the field Realm on the radacct table is not being updated with the MAC_ADDRESS it is empty, is the Digest-Realm the right attribute to be updated for the realm?<BR>
 <BR>
Thanks<BR>
 <BR>
Lucio<BR> <BR>> Date: Mon, 25 Jan 2010 17:52:35 +0100<BR>> From: aland@deployingradius.com<BR>> To: freeradius-users@lists.freeradius.org<BR>> Subject: Re: Help pls: How to strip REALM but insert it from a username@MAC onto an MySQL DB<BR>> <BR>> Lucio Godoy wrote:<BR>> > I have been reading unlang and also digging the Internet for help with<BR>> > my issue.<BR>> > <BR>> > I have added the following line to "vi sql/mysql/dialup.conf"<BR>> <BR>> Nope. As the "man" page says, you need to put the if/else/update<BR>> statements into the "authorize" section.<BR>> <BR>> Alan DeKok.<BR>> -<BR>> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html<BR>                                         <br /><hr />Do you want a Hotmail account? <a href='http://clk.atdmt.com/UKM/go/197222280/direct/01/' target='_new'>Sign-up now - Free</a></body>
</html>