SOLVED: RE: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-26 Thread Lucio Godoy
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})$/){

Re: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-25 Thread John Dennis
On 01/24/2010 03:01 PM, Lucio Godoy wrote: Hi Alan B and Alan D; I'll investigate the unlang, thats what i needed a pointer where to look. man unlang -- John Dennis jden...@redhat.com Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See

RE: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-25 Thread Lucio Godoy
Hi All; 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 #Comented out this line #sql_user_name = %{User-Name} #as per the man pages: # Double-quoted strings are expanded by inserting the

Re: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-25 Thread Alan DeKok
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

Re: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-25 Thread Alan Buxey
hi, out on a limb but i dont think unlang works in that conf environment...ou need to do the unlang before you call the SQL - and ensure that you set SQL-User-Name before you call the sql in the virtual server alan - List info/subscribe/unsubscribe? See

RE: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-25 Thread Lucio Godoy
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 {

Re: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-25 Thread Alan DeKok
Lucio Godoy wrote: I have created this rule on the file sites-available/default on the authorize section: if(%{User-Name}){ Or just: if (User-Name) { The unlang docs say that means check if the attribute exists. if (%{User-Name} =~

RE: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-24 Thread Lucio Godoy
Guys; I really need some ideas here pls. Many thanks Lucio From: luciocfgo...@hotmail.com To: freeradius-users@lists.freeradius.org Subject: How to strip REALM but insert it from a usern...@mac onto an MySQL DB Date: Fri, 22 Jan 2010 14:28:50 + Hi All; I have been running

Re: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-24 Thread Alan Buxey
Hi, Guys; I really need some ideas here pls. what help, exactly, do you need? you've described pretty much all you need and how you'll do it - just write the relevant unlang in your site config... alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-24 Thread Alan DeKok
Lucio Godoy wrote: I would like to continue with the same authentication method by when the user is authenticating they will include their MAC address as such: username @ MAC_ADDRESS Freeradius is to strip the MAC_ADDRESS, then insert onto the field Realm on the table radacct and then

RE: Help pls: How to strip REALM but insert it from a usern...@mac onto an MySQL DB

2010-01-24 Thread Lucio Godoy
Hi Alan B and Alan D; I'll investigate the unlang, thats what i needed a pointer where to look. I'll post my findings Many thanks Lucio Date: Sun, 24 Jan 2010 17:04:42 +0100 From: al...@deployingradius.com To: freeradius-users@lists.freeradius.org Subject: Re: Help pls: How