Question, How do you convert the SQL-User-Name sent to upper case? I have my mac address store in upper case but the client is sending its mac address in lower case. I'm trying to edit the sql.conf file but not successful. Username = '%{SQL-User-Name}' Thanks in advance... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
fvt3 <fvt3@yahoo.com> wrote:
How do you convert the SQL-User-Name sent to upper case? I have my mac address store in upper case but the client is sending its mac address in lower case.
You can't really. Why not do a case-insensitive match in SQL? Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
Ok, so how do you set freeradius to do a case-insensitive match? I have "AB:CD:EF:::" in mysql and when a user authenticate with "ab:cd:ef:::" , radius reply with login incorect... Thanks in advance --- Alan DeKok <aland@deployingradius.com> wrote:
fvt3 <fvt3@yahoo.com> wrote:
How do you convert the SQL-User-Name sent to upper case? I have my mac address store in upper case but the client is sending its mac address in lower case.
You can't really.
Why not do a case-insensitive match in SQL?
Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Le Mon, Aug 07, 2006 at 09:10:56AM -0700, fvt3 ecrivait:
Ok, so how do you set freeradius to do a case-insensitive match? I have "AB:CD:EF:::" in mysql and when a user authenticate with "ab:cd:ef:::" , radius reply with login incorect... Thanks in advance
Did you try to set lower_user to yes in radiusd.conf ? Regards, Fox.
----- Original Message ----- From: "Francois-Xavier GAILLARD" <fx.gaillard@thefox.com.fr> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Monday, August 07, 2006 9:19 PM Subject: Re: sql.conf
Le Mon, Aug 07, 2006 at 09:10:56AM -0700, fvt3 ecrivait:
Ok, so how do you set freeradius to do a case-insensitive match? I have "AB:CD:EF:::" in mysql and when a user authenticate with "ab:cd:ef:::" , radius reply with login incorect... Thanks in advance
Did you try to set lower_user to yes in radiusd.conf ?
And depending where you want to shift your load to (Radius vs mysql), LOWER() UPPER() functions in MySQL is also obviously very nice to use if you spend a bit of time customising the queries... -- C
not sure about mysql, but with mssql it's pretty easy... just do something like this... select id, lower('%{SQL-User-Name}'), ... or select id, upper(%{SQL-User-Name}'), ... you will find something that works if you look hard enough... ----- Original Message ----- From: "Alan DeKok" <aland@deployingradius.com> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Monday, August 07, 2006 10:14 AM Subject: Re: sql.conf fvt3 <fvt3@yahoo.com> wrote:
How do you convert the SQL-User-Name sent to upper case? I have my mac address store in upper case but the client is sending its mac address in lower case.
You can't really. Why not do a case-insensitive match in SQL? Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (5)
-
Alan DeKok -
Chris Knipe -
Duane Cox -
Francois-Xavier GAILLARD -
fvt3