Need "account valid for" attribute/counter (continuous time)

Mikhail Zolikoff mik at ivado.com
Thu Dec 15 17:50:00 CET 2005


Installation: Debian (sarge) + Freeradius 1.0.2 w/rlm_sqlcounter + MySQL
4.1.11


Hello, everyone!

I've been trying to do the following, and I thought that I had it
tonight, but I can't seem to get it:

I'd like to set a "dropdead date/time" by which a user can log into my
Freeradius server.  I'm thinking of an attribute or counter that sets or
performs the following:

login-deadline
or account-timeout
or last-login-date
or last-login-time
or account-valid-for

I'm not trying to limit how much a user can be logged in per unit of
time (daily, monthly, etc.), but instead set the last time the user can
possibly login starting from the first time they login.  So, if this
attribute is set to 86400, from the first time they login they can do
whatever they want for a day but then they're done.  Basically a
continuous counter (or a math operation), whether the user is logged in
or not.

session-timeout works on a per session basis, so that doesn't work.
Max-All-Session works like a prepaid card and only removes time in
discontinuous chunks.  What I really need is either an attribute or
counter (like rlm_sqlcounter or rlm_counter) that can determine whether
a user is close to their account deadline and let them pass through or
be denied.

Any thoughts?  I've been banging my head against this for a while and
can't seem to figure it out.  I've searched just about every website and
can't find a darn thing.  I can get close, but nothing that takes care
of the accounting without some custom programming.

Thanks!




More information about the Freeradius-Users mailing list