How to use sqlcounter to disconnect a user after reaching the daily quota?

Alan DeKok aland at deployingradius.com
Sun Jan 7 20:17:38 CET 2018


On Jan 7, 2018, at 1:55 PM, Houman <houmie at gmail.com> wrote:
> I have a follow-up question to this solution you had proposed.  I was
> hoping to use radgroupcheck instead of radcheck table.
> 
> So I inserted the limitation in there:
> INSERT INTO `radgroupcheck` (`id`, `groupname`, `attribute`, `op`, `value`)
> VALUES (1, 'group-1', 'My-Daily-Usage', '<', '1000000');
> 
> And inserted added the user to the group:
> INSERT INTO `radusergroup` (`username`, `groupname`, `priority`)
> VALUES ('my-user', 'group-1', 10);
> 
> I also updated /etc/freeradius/mods-available/sql to read groups.
> sql {
> read_groups = yes
> ...
> }
> 
> Two observations:
> 1) It doesn't work.

  See the FAQ for "it doesn't work".

> 2) When I login with NAS, the new entry in radacct doesn't include the
> groupname.  What do I have to do?

  Why would you expect the group name to be in the radacct table?

  All of the documentation describes how the SQL module works.  None of it says that the group name is stored in radacct.

  Alan DeKok.




More information about the Freeradius-Users mailing list