Is there any way to make the rlm-checkval check not case sensitive rlm_checkval: Item Name: Calling-Station-Id, Value: 00-21-5C-7B-FF-2D rlm_checkval: Value Name: Calling-Station-Id, Value: 00-21-5c-7b-ff-2d I have two different types of access points that i have to use right now and the cisco puts everything in caps and the proxium puts everything lower case. I am using mysql as my backed database. mysql> select * from radcheck order by id; +----+----------+--------------------+----+-------------------+ | id | UserName | Attribute | op | Value | +----+----------+--------------------+----+-------------------+ | 37 | dell1 | User-Password | := | dell1 | | 39 | dell1 | Calling-Station-Id | := | 00-19-7d-a6-ad-06 | | 40 | hp1 | User-Password | := | hp1 | | 41 | hp1 | Calling-Station-Id | := | 00-21-5c-7b-ff-2d | +----+----------+--------------------+----+-------------------+ 4 rows in set (0.00 sec)
You can use perl lc function to make sure attribute is always lower case. List perl before checkval. Ivan Kalik Kalik Informatika ISP Dana 16/12/2008, "lists@justinawilliams.com" <lists@justinawilliams.com> piše:
Is there any way to make the rlm-checkval check not case sensitive
rlm_checkval: Item Name: Calling-Station-Id, Value: 00-21-5C-7B-FF-2D rlm_checkval: Value Name: Calling-Station-Id, Value: 00-21-5c-7b-ff-2d
I have two different types of access points that i have to use right now and the cisco puts everything in caps and the proxium puts everything lower case.
I am using mysql as my backed database.
mysql> select * from radcheck order by id; +----+----------+--------------------+----+-------------------+ | id | UserName | Attribute | op | Value | +----+----------+--------------------+----+-------------------+ | 37 | dell1 | User-Password | := | dell1 | | 39 | dell1 | Calling-Station-Id | := | 00-19-7d-a6-ad-06 | | 40 | hp1 | User-Password | := | hp1 | | 41 | hp1 | Calling-Station-Id | := | 00-21-5c-7b-ff-2d | +----+----------+--------------------+----+-------------------+ 4 rows in set (0.00 sec)
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Is there any way that you can point me in the right direction with what i need to do. I am not able to find any documentation on what you are saying do. Thanks
You can use perl lc function to make sure attribute is always lower case. List perl before checkval.
Ivan Kalik Kalik Informatika ISP
Dana 16/12/2008, "lists@justinawilliams.com" <lists@justinawilliams.com> pi¹e:
Is there any way to make the rlm-checkval check not case sensitive
rlm_checkval: Item Name: Calling-Station-Id, Value: 00-21-5C-7B-FF-2D rlm_checkval: Value Name: Calling-Station-Id, Value: 00-21-5c-7b-ff-2d
I have two different types of access points that i have to use right now and the cisco puts everything in caps and the proxium puts everything lower case.
I am using mysql as my backed database.
mysql> select * from radcheck order by id; +----+----------+--------------------+----+-------------------+ | id | UserName | Attribute | op | Value | +----+----------+--------------------+----+-------------------+ | 37 | dell1 | User-Password | := | dell1 | | 39 | dell1 | Calling-Station-Id | := | 00-19-7d-a6-ad-06 | | 40 | hp1 | User-Password | := | hp1 | | 41 | hp1 | Calling-Station-Id | := | 00-21-5c-7b-ff-2d | +----+----------+--------------------+----+-------------------+ 4 rows in set (0.00 sec)
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Is there any way that you can point me in the right direction with what i need to do. I am not able to find any documentation on what you are saying do.
http://wiki.freeradius.org/Rlm_perl http://perl.about.com/od/programmingperl/qt/perllcfunction.htm Ivan Kalik Kalik Informatika ISP
I am not really up with perl... Is there any way that perl can rewrite the request and take out either the . or : or - between characters as well as make everything lower case? so that the calling-station-id request would be 00197da6ad06 not 00:19:7d:a6:ad:06 or 00-19-7d-a6-ad-06 or 0019.7da6.ad06 Thanks
Is there any way that you can point me in the right direction with what i need to do. I am not able to find any documentation on what you are saying do.
http://wiki.freeradius.org/Rlm_perl
http://perl.about.com/od/programmingperl/qt/perllcfunction.htm
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
lists@justinawilliams.com wrote:
I am not really up with perl... Is there any way that perl can rewrite the request and take out either the . or : or - between characters as well as make everything lower case?
so that the calling-station-id request would be 00197da6ad06 not 00:19:7d:a6:ad:06 or 00-19-7d-a6-ad-06 or 0019.7da6.ad06
I have some unlang action for this that I use: --------- if ( Calling-Station-Id =~ /^([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2})$/i ) { update request { Calling-Station-Id := "%{1}-%{2}-%{3}-%{4}-%{5}-%{6}" } update control { Tmp-String-0 := "%{1}%{2}%{3}%{4}%{5}%{6}" } } if ( Called-Station-Id =~ /^([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2}).?([0-9a-f]{2})$/i ) { update request { Called-Station-Id := "%{1}-%{2}-%{3}-%{4}-%{5}-%{6}" } } ------- It seems to be RFCy if you keep with 00-11-22-33-44-55 as the style for MAC addresses, so outside FreeRADIUS it's stored in the RFC-manner[1] and for where I need to do 'fun' stuff[1] with it internally I use the Tmp-String-X family of internal variables. Cheers Alex [1] LDAP lookups for example, such as cn=001122334455 -- Alexander Clouter .sigmonster says: Do not use the blue keys on this terminal.
Is there a way with Perl to make the calling-station-id query to the database not have any symbles in it and force it to be lower case . where the mac will look at 001e0b25ecbd
tnt@kalik.net wrote:
You can use perl lc function to make sure attribute is always lower case. List perl before checkval.
I personally use lower() (pgsql) and do it at the SQL server end.
Cheers
Alex
-- Alexander Clouter .sigmonster says: We are not a clone.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Yes. Usual way is to strip delimiters from the caller id in hints file. A for lower case - that depends on the database. Read the documentation for the one you are using and see what function does it use for turning the string into lower case. Ivan Kalik Kalik Informatika ISP Dana 18/12/2008, "lists@justinawilliams.com" <lists@justinawilliams.com> piše:
Is there a way with Perl to make the calling-station-id query to the database not have any symbles in it and force it to be lower case . where the mac will look at 001e0b25ecbd
tnt@kalik.net wrote:
You can use perl lc function to make sure attribute is always lower case. List perl before checkval.
I personally use lower() (pgsql) and do it at the SQL server end.
Cheers
Alex
-- Alexander Clouter .sigmonster says: We are not a clone.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alexander Clouter -
lists@justinawilliams.com -
tnt@kalik.net