Thanks Phil. It worked very well (that's what I was looking for). Thanks in advance. On Tue, Jul 31, 2012 at 3:31 PM, Phil Mayers <p.mayers@imperial.ac.uk>wrote:
On 31/07/12 13:19, Andrei Petru Mura wrote:
I declared a new attribute on FR dictionary, called CarboSolutions-NotBefore. This attribute should contain the data time as a string before what the user should not be able to authenticate. That attribute is placed in radcheck table (like: CarboSolutions-NotBefore >= 20120801). I tried to deal with that following some threads from that forum on similar issues, that sooner or later leads to unlang procedures. I also read the unlang's man page. But I can't understand how to deal with unlang. Can anyone help me to obtain what I need?
What I need: I need that every authentication request, should contain an CarboSolutions-NotBefore field with current date.
It isn't very clear what you want to do here, I'm afraid.
What have you tried?
If I understand you correctly, you want to store an attribute in the "radcheck" table that contains a date, and compare that date to "today".
If so, you can do this:
authorize { ... # put todays date into the attribute update request { CarboSolutions-NotBefore := "%Y%m%d" } # run SQL module sql
... }
...and in your radcheck table:
insert into radcheck (username,attribute,op,val) values ( 'username', 'CarboSolutions-NotBefore', '>=', '20120731' ); - List info/subscribe/unsubscribe? See http://www.freeradius.org/** list/users.html <http://www.freeradius.org/list/users.html>