Hi all;

 

 

I am nearly there, thanks to you all.

 

I have created this rule on the file sites-available/default on the authorize 
section:

 

if("%{User-Name}"){


        if ("%{User-Name}" =~ /^([...@]*)(@([-[:alnum:].]+))?$/){
                        update request {
                                User-Name := "%{1}"
                                Digest-Realm := "%{3}"
                        }
        }

        else {
                        reject
        }
}


 

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?

 

Thanks

 

Lucio
 
> Date: Mon, 25 Jan 2010 17:52:35 +0100
> From: al...@deployingradius.com
> To: freeradius-users@lists.freeradius.org
> Subject: Re: Help pls: How to strip REALM but insert it from a usern...@mac 
> onto an MySQL DB
> 
> Lucio Godoy wrote:
> > I have been reading unlang and also digging the Internet for help with
> > my issue.
> > 
> > I have added the following line to "vi sql/mysql/dialup.conf"
> 
> Nope. As the "man" page says, you need to put the if/else/update
> statements into the "authorize" section.
> 
> Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
                                          
_________________________________________________________________
Do you have a story that started on Hotmail? Tell us now
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