Failed to create the pair: Unknown attribute Max-All-Session

Sergio Diaz sdiazf at logitel.com.mx
Wed Apr 15 16:55:52 CEST 2015


Hello Alan

I reviewed the configuration files and looks fine, any idea ?


Saludos Cordiales,



 


 Sergio Diaz
  Infraestructura TI

  01(55) 5265.0145 
  (044) 55.28.99.95.71
  sdiazf at logitel.com.mx
  www.logitel.com.mx



-----Mensaje original-----
De: Sergio Diaz 
Enviado el: martes, 14 de abril de 2015 06:38 p. m.
Para: FreeRadius users mailing list
Asunto: RE: Failed to create the pair: Unknown attribute Max-All-Session

Thanks for your answer,

This is my configuration:

/etc/freeradius/sql/mysql/counter.conf

sqlcounter noresetcounter {
        counter-name = Max-All-Session-Time
                check-name = Max-All-Session
                sqlmod-inst = sql
                key = User-Name
                reset = never
        query = "SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE UserName='%{%k}'"

}

In the file: /etc/freeradius/radiusd.conf i have 

$INCLUDE sql.conf       

        #
        #  This module is an SQL enabled version of the counter module.
        #
        #  Rather than maintaining seperate (GDBM) databases of
        #  accounting info for each counter, this module uses the data
        #  stored in the raddacct table by the sql modules. This
        #  module NEVER does any database INSERTs or UPDATEs.  It is
        #  totally dependent on the SQL module to process Accounting
        #  packets.
        #
        $INCLUDE sql/mysql/counter.conf 

Already i did a restart of the freeradius Service, but not work. I dont know why?


Saludos Cordiales,



 


 Sergio Diaz
  Infraestructura TI

  01(55) 5265.0145 
  (044) 55.28.99.95.71
  sdiazf at logitel.com.mx
  www.logitel.com.mx



-----Mensaje original-----
De: Freeradius-Users [mailto:freeradius-users-bounces+sdiazf=logitel.com.mx at lists.freeradius.org] En nombre de Alan DeKok
Enviado el: martes, 14 de abril de 2015 04:23 p. m.
Para: FreeRadius users mailing list
Asunto: Re: Failed to create the pair: Unknown attribute Max-All-Session

On Apr 14, 2015, at 4:20 PM, Sergio Diaz <sdiazf at logitel.com.mx> wrote:
> I have a FreeRADIUS Version 2.1.12 with mysql db
> 
> I have a hotspot with coova chilli devices like Access point (open-mesh with cloud controller cloudtrax), everything Works fine except with the attribute" Max-All-Session" in the radcheck table, when i put this attribute the users  can't authenticate, if i delete this attribute users can authenticate. I need limit a user access period for 1 day ,1 hour or 1 week from his first time he login using a prepaid card.
 
  That should be simple.

> This user never has been authenticated, so he haven't registry in the radacct table
> 
> Id		username	attribute		op	value
> 2262		a1z5		Auth-Type		:=	Accept
> 2263		a1z5		Simultaneous-Use	:=	1
> 2264		a1z5		Max-All-Session	:=	3600

  OK...

> Even if i use other attribute like: Expiration it works with out problem.

  Yes, because Expiration is managed by the rlm_expiration module.

> rlm_sql: Failed to create the pair: Unknown attribute "Max-All-Session" requires a hex string, not "3600"

  You read the documentation saying to use "Max-All-Session".  That's good.  You didn't read the documentation saying that the attribute is managed by the sqlcounter module.

  Configure the sqlcounter module.  It will define the Max-All-Session attribute for you.  And, do the session counting that you're looking for.  The base SQL module just looks up data in SQL.  It doesn't do anything more than that.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list