acct-session-start attribute ?

Jeremy Ravel Jeremy.Ravel at etu.univ-savoie.fr
Tue Jun 2 11:13:06 CEST 2015


Thanks for your time, 
But I am a bit lost, I am beginner on freeradius. 
- Should I create the sql query to get my attribute(acc-start-date) ? Or freeRadius will do it himself ? 

>Right now, you're trying to do it the most complicated way possible. I have no idea why. 
If you see a easier way to do it, can you give a hint how I should do it ? 

To resume my configuration 

File /site-available/default 
authorize { 

if (!NAS-IP-Address) { 
reject 
} 
sql 
chillispot_max_bytes 
noresetcounter 
dailycounter 
# check date 
check_validity 
And in the file ploicy.conf 

check_validity { 

if (Acc-start-date < "%{Current-Time}") { 
reject 
} 
} 


----- Mail original -----

De: "Alan DeKok" <aland at deployingradius.com> 
À: "FreeRadius users mailing list" <freeradius-users at lists.freeradius.org> 
Envoyé: Vendredi 29 Mai 2015 16:59:11 
Objet: Re: acct-session-start attribute ? 

On May 29, 2015, at 10:05 AM, Jeremy Ravel <Jeremy.Ravel at etu.univ-savoie.fr> wrote: 
> Thanks, but i still got a problem, 

One issue is that you're not following instructions. 

> Whatever I give for my date attribut , I match the if(for the date) so I cant logon 
> Maybe I don't give a good date format ? I use this kind of date " May 29 2015 14:38:27 CEST " 

That should work. 
> 

> Fri May 29 15:57:33 2015 : Debug: sqlcounter_expand: 'SELECT value FROM `radcheck` WHERE UserName = '%{User-Name}' AND attribute = 'Acc-start-date'' 
> Fri May 29 15:57:33 2015 : Info: [Acc-start-date] expand: SELECT value FROM `radcheck` WHERE UserName = '%{User-Name}' AND attribute = 'Acc-start-date' -> SELECT value FROM `radcheck` WHERE UserName = 'day2' AND attribute = 'Acc-start-date' 
> Fri May 29 15:57:33 2015 : Debug: WARNING: Please replace '%S' with '${sqlmod-inst}' 
> Fri May 29 15:57:33 2015 : Debug: sqlcounter_expand: '%{sql:SELECT value FROM `radcheck` WHERE UserName = 'day2' AND attribute = 'Acc-start-date'}' 

What are you doing there? That makes no sense. Don't do that. The normal SQL module already takes care of setting the attribute. 

If you're having trouble with SQL (and you are), just put the attribute into the "users" file. Simplify your tests. Maybe try different date formats... 

Right now, you're trying to do it the most complicated way possible. I have no idea why. 

Alan DeKok. 


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



More information about the Freeradius-Users mailing list