acct-session-start attribute ?
Jeremy Ravel
Jeremy.Ravel at etu.univ-savoie.fr
Fri May 29 14:27:29 CEST 2015
Thanks,
But I think i miss something,
When I create an user, i want to be able to put a date when this user will be able to logon
I added this in the file dictionnary
ATTRIBUTE Date 3003 string
And i want to compare this date with the current date, but i think i have to add sql request to get this, can i do my query in the police.conf file ?
----- Mail original -----
De: "Alan DeKok" <aland at deployingradius.com>
À: "FreeRadius users mailing list" <freeradius-users at lists.freeradius.org>
Envoyé: Vendredi 29 Mai 2015 13:23:44
Objet: Re: acct-session-start attribute ?
On May 29, 2015, at 4:29 AM, Jeremy Ravel <Jeremy.Ravel at etu.univ-savoie.fr> wrote:
> Hi, thanks for the help,
> So I added in policy.conf this
> check_validity {
> update control {
> Current-Time := "%l"
Don't do that. Current-Time is automatically set.
> }
> if (Date > control:Current-Time) {
Don't do that. What's "Date" ?
> update reply {
> Reply-Message := "account not yet active"
> }
> reject
> }
> }
> I created the attribute date, but when i tried to logon, i receive reject response
No, you didn't create the attribute Date.
> This is freeradius -XXX
...
> Fri May 29 10:23:34 2015 : Debug: WARNING: You are modifying the value of virtual attribute Current-Time. This is not supported.
Does that message have any meaning for you?
> Fri May 29 10:23:34 2015 : Info: (Attribute Date was not found)
And that message?
Instead, do:
if (Current-Time < "1 January 2015") {
...
}
i.e. use a DATE. A real, humanly readable date. Not the string "Date".
Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list