On Monday 07 July 2003 12:31 am, hilman firmansyah wrote:
> Hello,
>
> How to make different accounting group , example silver and gold.
> I need Monthy-Max-hours = 30 hours for silver group member
> and 250 hours for gold group member.
>
> Any clue ?

Condensed version: (sql) counter
   reset=monthly
   attribute to "count" against: acct-session-time
   attribute to "key" against: user-name
   set "check-name" to "monthly-max-hours" 

in file, include "monthly-max-hours := <time-in-seconds>" as a check attribute
in sql db, include as radcheck/groupcheck item (more likely group)

in .conf file, make sure the counter action occurs AFTER the "files" or "sql" 
action [counter intuitive at first -- the file/sql section is "setting up" a 
test that will be performed later, not the other way around where the counter 
sets a variable and the file/sql section can compare against it]

side effect: when the counted variable is "acct-session-time", radiusd will 
supply an additional response item of "session-timeout".  This will be set to 
the check-value - accumulated-time-so-far; if your NAS supports it, the user 
will be logged off "when their time runs out"

-- 
Yet another Blog: http://osnut.homelinux.net

Attachment: pgp00000.pgp
Description: signature

Reply via email to