Re: freeradius 3.1 sqlcounter[41]: Attribute Daily-Session-Time already defined with different flags
Hi again and thanks for he answer.
The reason im using 3.1 is a bug, if dont remember bad, you ( Alan ) fixed on this version. It´s about {Sql-group} can´t be called beyond a sql instance on authorize { } , instead of {Sql-User-name}, it can be called on, for example post-auth secction
Im searching the github link about the bug for more references
Thanks
2017-03-01 22:45 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
On Mar 1, 2017, at 3:34 PM, mpajarin plexus <mpajarin.plexus@gmail.com> wrote:
Im running freeradius 3.1.0 version, on Centos and on debug -X get an error like this:
3.1 isn't an officially supported release. Please use v3.0.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list /users.html
On Mar 1, 2017, at 5:29 PM, mpajarin plexus <mpajarin.plexus@gmail.com> wrote:
Hi again and thanks for he answer.
The reason im using 3.1 is a bug, if dont remember bad, you ( Alan ) fixed on this version. It´s about {Sql-group} can´t be called beyond a sql instance on authorize { } , instead of {Sql-User-name}, it can be called on, for example post-auth secction
I'm not sure what that means. You should be able to use SQL-Group with any instance of SQL. Just use "instance-SQL-Group", where "instance" is the instance name. Alan DeKok.
Hi. I mean i dont know how or where can and where can´t to call %{sql_instance-SQL-Group} Making test , for example on accounting secction if (1 ==1 ){ update control { &Foo-Bar-Baz := "%{sql_instance:SELECT groupname FROM radusergroup WHERE username = '%{sql_instance-SQL-Group}' ORDER BY priority ;}" } } I suppose that if account requests doesn´t include the group, o i must to calculate again by a sql sentence. Miguel Pajarín Presas *Departamento de Sistemas * *Email: *miguel.pajarinpresas@plexus.es [image: logoPlexus] Plexus, S.L. 2016 ® Rúa Jose Villar Granjel 22-24 Parque Empresarial Boisaca CP: 15890 Santiago de Compostela – A Coruña ►*Telefono:* 902 998 005 ► *Fax:* 902 995 280 ►* Web: *www.plexus.es 2017-03-02 0:09 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
On Mar 1, 2017, at 5:29 PM, mpajarin plexus <mpajarin.plexus@gmail.com> wrote:
Hi again and thanks for he answer.
The reason im using 3.1 is a bug, if dont remember bad, you ( Alan )
fixed
on this version. It´s about {Sql-group} can´t be called beyond a sql instance on authorize { } , instead of {Sql-User-name}, it can be called on, for example post-auth secction
I'm not sure what that means.
You should be able to use SQL-Group with any instance of SQL. Just use "instance-SQL-Group", where "instance" is the instance name.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
On Mar 2, 2017, at 4:47 AM, mpajarin plexus <mpajarin.plexus@gmail.com> wrote:
I mean i dont know how or where can and where can´t to call %{sql_instance-SQL-Group}
You can use it like SQL-Group.
Making test , for example on accounting secction
if (1 ==1 ){ update control {
&Foo-Bar-Baz := "%{sql_instance:SELECT groupname FROM radusergroup WHERE username = '%{sql_instance-SQL-Group}' ORDER BY priority ;}"
} }
I suppose that if account requests doesn´t include the group, o i must to calculate again by a sql sentence.
The accounting requests don't include the group. And why are you SELECTing from the radusergroup table manually? The SQL module already does that for you. I just don't understand what you're trying to do. Alan DeKok.
The pourpose of this is inject an attribute from any list, from one ( auth pe ) section to another ( accounting )without doing a database query. I will reread the documentation again. Thank you for your patience Miguel 2017-03-02 14:07 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
On Mar 2, 2017, at 4:47 AM, mpajarin plexus <mpajarin.plexus@gmail.com> wrote:
I mean i dont know how or where can and where can´t to call %{sql_instance-SQL-Group}
You can use it like SQL-Group.
Making test , for example on accounting secction
if (1 ==1 ){ update control {
&Foo-Bar-Baz := "%{sql_instance:SELECT groupname FROM radusergroup WHERE username = '%{sql_instance-SQL-Group}' ORDER BY priority ;}"
} }
I suppose that if account requests doesn´t include the group, o i must to calculate again by a sql sentence.
The accounting requests don't include the group.
And why are you SELECTing from the radusergroup table manually? The SQL module already does that for you.
I just don't understand what you're trying to do.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
On Mar 2, 2017, at 11:33 AM, mpajarin plexus <mpajarin.plexus@gmail.com> wrote:
The pourpose of this is inject an attribute from any list, from one ( auth pe ) section to another ( accounting )without doing a database query.
I still have no idea what that means. I think you don't, either. The server receives packets. Either Access-Request or Accounting-Request packets. The server does not let you update an accounting packet from an authentication packet, or vice versa. The only way to track information across packets like that is via a database. You put things into the database in one packet, and retrieve them in another. I think you need to read the FreeRADIUS technical guide: http://networkradius.com/doc/FreeRADIUS%20Technical%20Guide.pdf It explains how RADIUS works, and how FreeRADIUS works. It should clear up a lot of confusion. Alan DeKok.
participants (2)
-
Alan DeKok -
mpajarin plexus