rlm_sqlcounter: Max-Daily-Session.

Arran Cudbard-Bell a.cudbardb at freeradius.org
Tue May 13 09:19:59 CEST 2014


On 13 May 2014, at 02:31, * <zhex900 at gmail.com> wrote:

> Hi,
> 
> I followed your instructions. Now I get the following errors:
> 
> (2)   [-sql] = ok
> (2)   [expiration] = noop
> (2)   [logintime] = noop
> (2) WARNING: pap : Auth-Type already set.  Not setting to PAP
> (2)   [pap] = noop
> (2) dailycounter : Entering module authorize code
> (2) ERROR: dailycounter : %{sql:SELECT SUM(acctsessiontime) FROM radacct WHERE username = '%{User-Name}' AND acctstarttime BETWEEN FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')}
> (2) ERROR: dailycounter :                                                                                                                         ^ Invalid variable expansion
> (2)   [dailycounter] = fail
> (2)  } #  authorize = fail
> (2) Using Post-Auth-Type Reject
> 
> /etc/freeradius/mods-enabled/sqlcounter 
> 
> sqlcounter dailycounter{
>         counter_name = "Daily-Session-Time"
>         check_name = "Max-Daily-Session"
>         reply_name = "Session-Timeout"
>         sql_module_instance = "sql"
>         key = "User-Name"
>         reset = "daily"
>         cache-size = 5000
>         query = "SELECT SUM(acctsessiontime) FROM radacct WHERE username = '%{${
> key}}' AND acctstarttime BETWEEN FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')"
> }
> 

We fixed quite a few issues with the sqlcounter module in 3.0.3, it should all work now.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140513/67e3e294/attachment-0001.pgp>


More information about the Freeradius-Users mailing list