Hello, I am having some troubles creating templates with wimax attributes for users. I created files with atributes in them in the form: Alvarion-R3-IF-Name += CPEL3Mgmt, Alvarion-PDFID += 1, WiMAX-Packet-Data-Flow-Id += 1, WiMAX-Service-Data-Flow-Id += 1, WiMAX-Direction += 3, WiMAX-Transport-Type += 1, WiMAX-Uplink-QOS-Id += 1, WiMAX-Downlink-QOS-Id += 1, and then in the users file I use: 30001020 Cleartext-Password := "30001020" $INCLUDE cpe_mgmt, $INCLUDE ethcs_1_vlan_sf, WiMAX-VLAN-ID += 175, Session-Timeout = 3600, Reply-Message = "4motion test" but I am getting error: Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/users[63]: Parse error (reply) for entry 30001020: expecting operator Thu Oct 20 16:35:24 2011 : Error: Errors reading /usr/local/etc/raddb/users Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/modules/files[7]: Instantiation failed for module "files" Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/sites-enabled/default[152]: Failed to load module "files". Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section. Simillar thing happened when i tried using template.conf 30001020 Cleartext-Password := "30001020" $template cpe_mgmt, Session-Timeout = 3600, Reply-Message = "4motion test" but the error i got was: Thu Oct 20 17:00:46 2011 : Debug: including configuration file /usr/local/etc/raddb/templates.conf Thu Oct 20 17:00:46 2011 : Error: /usr/local/etc/raddb/templates.conf[109]: Invalid operator in assignment Thu Oct 20 17:00:46 2011 : Error: Errors reading /usr/local/etc/raddb/radiusd.conf Is the += format not supported in the templates.conf?? Or is there any other way to save myself the problem of typing all the attributes for each user?? Thanks in advance. Kind regards, Krzysztof
extracted from templates.conf : # For now, you can use templates only for sections in # radiusd.conf, not sub-sections. So you still have to use # the "$INCLUDE file.." method for things like defining # multiple "sql" modules, each with similar configuration. It seems this cannot be used in users file ... Instead, you can use $INCLUDE in radiusd.conf ... Regards, Fred 2011/10/20 Krzysztof Grobelak <kgrobelak@airspeed.ie>:
Hello,
I am having some troubles creating templates with wimax attributes for users. I created files with atributes in them in the form:
Alvarion-R3-IF-Name += CPEL3Mgmt, Alvarion-PDFID += 1, WiMAX-Packet-Data-Flow-Id += 1, WiMAX-Service-Data-Flow-Id += 1, WiMAX-Direction += 3, WiMAX-Transport-Type += 1, WiMAX-Uplink-QOS-Id += 1, WiMAX-Downlink-QOS-Id += 1,
and then in the users file I use:
30001020 Cleartext-Password := "30001020" $INCLUDE cpe_mgmt, $INCLUDE ethcs_1_vlan_sf, WiMAX-VLAN-ID += 175, Session-Timeout = 3600, Reply-Message = "4motion test"
but I am getting error: Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/users[63]: Parse error (reply) for entry 30001020: expecting operator Thu Oct 20 16:35:24 2011 : Error: Errors reading /usr/local/etc/raddb/users Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/modules/files[7]: Instantiation failed for module "files" Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/sites-enabled/default[152]: Failed to load module "files". Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section.
Simillar thing happened when i tried using template.conf
30001020 Cleartext-Password := "30001020" $template cpe_mgmt, Session-Timeout = 3600, Reply-Message = "4motion test"
but the error i got was: Thu Oct 20 17:00:46 2011 : Debug: including configuration file /usr/local/etc/raddb/templates.conf Thu Oct 20 17:00:46 2011 : Error: /usr/local/etc/raddb/templates.conf[109]: Invalid operator in assignment Thu Oct 20 17:00:46 2011 : Error: Errors reading /usr/local/etc/raddb/radiusd.conf
Is the += format not supported in the templates.conf?? Or is there any other way to save myself the problem of typing all the attributes for each user??
Thanks in advance.
Kind regards, Krzysztof
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thank you for the reply. I understand why $template didn't work but I am not sure why the $INCLUDE file is not working or is its usage also limited to radiusd.conf Kind regards, Krzysztof On 20/10/11 17:20, Fred wrote:
extracted from templates.conf :
# For now, you can use templates only for sections in # radiusd.conf, not sub-sections. So you still have to use # the "$INCLUDE file.." method for things like defining # multiple "sql" modules, each with similar configuration.
It seems this cannot be used in users file ... Instead, you can use $INCLUDE in radiusd.conf ...
Regards, Fred
2011/10/20 Krzysztof Grobelak<kgrobelak@airspeed.ie>:
Hello,
I am having some troubles creating templates with wimax attributes for users. I created files with atributes in them in the form:
Alvarion-R3-IF-Name += CPEL3Mgmt, Alvarion-PDFID += 1, WiMAX-Packet-Data-Flow-Id += 1, WiMAX-Service-Data-Flow-Id += 1, WiMAX-Direction += 3, WiMAX-Transport-Type += 1, WiMAX-Uplink-QOS-Id += 1, WiMAX-Downlink-QOS-Id += 1,
and then in the users file I use:
30001020 Cleartext-Password := "30001020" $INCLUDE cpe_mgmt, $INCLUDE ethcs_1_vlan_sf, WiMAX-VLAN-ID += 175, Session-Timeout = 3600, Reply-Message = "4motion test"
but I am getting error: Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/users[63]: Parse error (reply) for entry 30001020: expecting operator Thu Oct 20 16:35:24 2011 : Error: Errors reading /usr/local/etc/raddb/users Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/modules/files[7]: Instantiation failed for module "files" Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/sites-enabled/default[152]: Failed to load module "files". Thu Oct 20 16:35:24 2011 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section.
Simillar thing happened when i tried using template.conf
30001020 Cleartext-Password := "30001020" $template cpe_mgmt, Session-Timeout = 3600, Reply-Message = "4motion test"
but the error i got was: Thu Oct 20 17:00:46 2011 : Debug: including configuration file /usr/local/etc/raddb/templates.conf Thu Oct 20 17:00:46 2011 : Error: /usr/local/etc/raddb/templates.conf[109]: Invalid operator in assignment Thu Oct 20 17:00:46 2011 : Error: Errors reading /usr/local/etc/raddb/radiusd.conf
Is the += format not supported in the templates.conf?? Or is there any other way to save myself the problem of typing all the attributes for each user??
Thanks in advance.
Kind regards, Krzysztof
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hello, You are trying to update reply in user.conf ; this is ok for static. If you want to go further, may be you could do the same using unlang (see man unlang) you could create a template doing the right update reply ... for example in template.conf : updateWimax1 { update reply { Alvarion-R3-IF-Name = CPEL3Mgmt Alvarion-PDFID = 1 WiMAX-Packet-Data-Flow-Id = 1 WiMAX-Service-Data-Flow-Id = 1 WiMAX-Direction = 3 WiMAX-Transport-Type = 1 WiMAX-Uplink-QOS-Id = 1 WiMAX-Downlink-QOS-Id = 1 } } Then, for example at end of authorize section in you config or in post-auth section : if ( some condition ....) { $template updateWimax1 } Fred
On 10/20/2011 05:05 PM, Krzysztof Grobelak wrote:
Hello,
I am having some troubles creating templates with wimax attributes for users. I created files with atributes in them in the form:
Alvarion-R3-IF-Name += CPEL3Mgmt, Alvarion-PDFID += 1, WiMAX-Packet-Data-Flow-Id += 1, WiMAX-Service-Data-Flow-Id += 1, WiMAX-Direction += 3, WiMAX-Transport-Type += 1, WiMAX-Uplink-QOS-Id += 1, WiMAX-Downlink-QOS-Id += 1,
You've got a comma on the final line here...
and then in the users file I use:
30001020 Cleartext-Password := "30001020" $INCLUDE cpe_mgmt, $INCLUDE ethcs_1_vlan_sf,
...then another comma directly after the $include. So the parser will see: Attribute += Value,, Try removing one of the commas. There are much better ways to do this - SQL, LDAP profiles, unlang policies in "policy.conf" and so on.
Krzysztof Grobelak wrote:
and then in the users file I use:
30001020 Cleartext-Password := "30001020" $INCLUDE cpe_mgmt, $INCLUDE ethcs_1_vlan_sf,
That's wrong. You can use $INCLUDE. It MUST be the first text on a line. No leading spaces or tabs. And $INCLUDEs CANNOT be in the middle of an entry like that.
Is the += format not supported in the templates.conf??
You're not using templates.
Or is there any other way to save myself the problem of typing all the attributes for each user??
Yes. Put them into a group, and use group checking. Repeating the attributes for each of 100's of users is inefficient. Alan DeKok.
participants (4)
-
Alan DeKok -
Fred -
Krzysztof Grobelak -
Phil Mayers