Alan, 1) When I said it doesn't work, I meant I tried to replicate your previous solution by utilising radgroupcheck instead of radcheck. And I have explained the steps I have taken to make this possible. Would you say I have missed any step? 2) What is the purpose of groupname field in radacct table then? I was expecting freeradius to check that the user belongs to that group in radusergroup and then would automatically fill that field as well in radacct next to everything it already does. On 7 January 2018 at 19:17, Alan DeKok <aland@deployingradius.com> wrote:
On Jan 7, 2018, at 1:55 PM, Houman <houmie@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.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list /users.html