Hi all, I still have a problem with rlm_counter. I don't undestand how does freeradius decide the order of modules initialization. I put my former mail that explain my problem at the end of this one.
To sum it up, it seems that the modules are initialized according the order defined in the authenticate section. As my authenticate section only includes "files", the files module get initialized before the counter module. So freeradius is unable to start... I'm quite sure this is a very stupid problem, but i'm unable to sort it out... Can someone give me a hint on what can be done ??? Thomas Favier. > -----Message d'origine----- > De : kkalev [mailto:[EMAIL PROTECTED]] > Objet : Re: using rlm_counter and sql > > Well, you will have to do the following very stupid thing: > > radiusd.conf: > > authorize{ > [...] > counter > files > counter > } I did that but the files modules is still initialized before the counter modules. After a few tries I think that it is in fact due to the authenticate section. If I write radiusd.conf that way : --- radiusd.conf authenticate { counter files } authorize { counter files counter } --- I have the following : --- output Module: Library search path is /usr/local/lib Module: Loaded Counter counter: filename = "/usr/local/etc/raddb/db.counter" counter: key = "User-Name" counter: reset = "monthly" counter: count-attribute = "Acct-Session-Time" counter: counter-name = "Monthly-Session-Time" counter: check-name = "Max-Monthly-Session" counter: allowed-servicetype = "Framed-User" counter: cache-size = 5000 rlm_counter: Counter attribute Monthly-Session-Time is number 1056 rlm_counter: Next reset 1012518000 Module: Instantiated counter (counter) radiusd.conf: "Counter" modules aren't allowed in 'authenticate' sections -- they have no such method. --- Which is totally normal, as the counter module does not have authentication functions. But as soon as I write : --- radiusd.conf authenticate { files } authorize { counter files counter } --- I get : --- output Module: Library search path is /usr/local/lib Module: Loaded files files: usersfile = "/usr/local/etc/raddb/users" files: acctusersfile = "/usr/local/etc/raddb/acct_users" files: compat = "no" /usr/local/etc/raddb/users[5]: Parse error (check) for entry DEFAULT: Unknown attribute Monthly-Session-Time Errors reading /usr/local/etc/raddb/users radiusd.conf[95]: files: Module instantiation failed. --- I also tried to switch the authenticate an authorize sections without success. What am I doing wrong ?? I have attached my full radiusd.conf, just in case... Thomas FAVIER Accelance Tel: +33 (0)4 37 43 12 22 Fax: +33 (0)4 37 43 12 20 www.accelance.fr
radiusd.conf
Description: Binary data
