hello everyone,

I'm working on a prepaid system which has various payment options. I would like to understand a bit more about the sqlcounter and what it actually does. I've looked at the rlm_sqlcounter file in the doc directory and the experimental.conf file in the raddb directory and I have a few questions regarding them.

In rlm_sqlcounter it says: "dailycounter: the counter that resets everyday, can be used for limiting daily access time (eg. 3 hours a day)"
Does this mean that the counter starts at a particular hour (say, midnight) every day and goes for 24 hours and then resets, OR, does it mean that the counter starts for each person at their first logon and counts 24 hours from that initial logon and then resets (so each person has 24 hours to use their session from when that person logged on)?
For my purposes, I would like to be able to allow people 24 hours to use up 1 hour of internet usage. if they do use up that 1 hour they should be rejected forever or if they don't use up that 1 hour by the end of the 24 hours (from when they first logged on) they would also be rejected forever....


which leads me to my next question, experimental.couf says about the sqlcounter - "This module NEVER does any database INSERTs or UPDATEs." I presume that means that even if i wanted it to it couldn't do INSERTs or UPDATEs just by design, or is it possible but just not advised?
To reject a user's authentication request forever, after they have used up their 24 hour expiry period or the 1 hour of usage, I would like to UPDATE the usergroup table and move that user from one group (say, Allow) to a rejected group (say, DenyForever). Is this possible in the sqlcounter module, or am I barking up the wrong tree? If i'm way off the plot here, would someone be kind enough to suggest a place for me to look for when to do that UPDATE?



My prepay options are: 1 hour usage, expires 24 hours after initial use. 24 hour usage, expires 24 hours after initial use. 30 hour usage, expires 1 month (31 days) after initial use.

I presume that if I get the '1 hour usage, 24 hour expiry' part working I will be able to figure out the rest.

Many thanks for reading this, and any help is much appreciated,
simon.

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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

Reply via email to