Hi, Currently on the MySQL database the class is remaining NULL and in the log files the class is being written mixed numbers/letters. log file: Class = 0x5253534f2d49542d4e6574776f726b696e67 in db: [image: image.png] Is it possible to write the actual value in the database and in the log file? Thanks.
Pizu, Of course, just need to update the raddb/mods-config/sql/main/queries.conf, therefore the latest 3.0.23 version is coming up with that changes as can be seen in our repo https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-confi... <https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-config/sql/main/mysql/queries.conf#L71> or if you don’t have any special modification in your local raddb/mods-config/sql/main/queries.conf, just overwrite your local queries.conf with the the latest like: e.g: $ cp /etc/raddb/mods-config/sql/main/queries.conf /etc/raddb/mods-config/sql/main/queries.conf.bak $ curl -o /etc/raddb/mods-config/sql/main/queries.conf https://raw.githubusercontent.com/FreeRADIUS/freeradius-server/v3.0.x/raddb/... <https://raw.githubusercontent.com/FreeRADIUS/freeradius-server/v3.0.x/raddb/mods-config/sql/main/mysql/queries.conf> If you got some error, report and just revert to the .bak -- Jorge Pereira jpereira@freeradius.org
On 26 Aug 2021, at 12:57, Pizu <pizpower@gmail.com> wrote:
Hi,
Currently on the MySQL database the class is remaining NULL and in the log files the class is being written mixed numbers/letters.
log file:
Class = 0x5253534f2d49542d4e6574776f726b696e67
in db:
[image: image.png]
Is it possible to write the actual value in the database and in the log file?
Thanks. <image.png>- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Ops, I forgot to mention that you need to remove the “#” from “column_name”, “packet_xlat” and “reply_xlat” e.g: https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-confi...
On 26 Aug 2021, at 13:49, Jorge Pereira <jpereira@freeradius.org> wrote:
Pizu,
Of course, just need to update the raddb/mods-config/sql/main/queries.conf, therefore the latest 3.0.23 version is coming up with that changes as can be seen in our repo https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-confi... <https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/raddb/mods-config/sql/main/mysql/queries.conf#L71> or if you don’t have any special modification in your local raddb/mods-config/sql/main/queries.conf, just overwrite your local queries.conf with the the latest like:
e.g:
$ cp /etc/raddb/mods-config/sql/main/queries.conf /etc/raddb/mods-config/sql/main/queries.conf.bak $ curl -o /etc/raddb/mods-config/sql/main/queries.conf https://raw.githubusercontent.com/FreeRADIUS/freeradius-server/v3.0.x/raddb/... <https://raw.githubusercontent.com/FreeRADIUS/freeradius-server/v3.0.x/raddb/mods-config/sql/main/mysql/queries.conf>
If you got some error, report and just revert to the .bak
-- Jorge Pereira jpereira@freeradius.org
On 26 Aug 2021, at 12:57, Pizu <pizpower@gmail.com> wrote:
Hi,
Currently on the MySQL database the class is remaining NULL and in the log files the class is being written mixed numbers/letters.
log file:
Class = 0x5253534f2d49542d4e6574776f726b696e67
in db:
[image: image.png]
Is it possible to write the actual value in the database and in the log file?
Thanks. <image.png>- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Aug 26, 2021, at 11:57 AM, Pizu <pizpower@gmail.com> wrote:
Currently on the MySQL database the class is remaining NULL and in the log files the class is being written mixed numbers/letters.
log file:
Class = 0x5253534f2d49542d4e6574776f726b696e67
the Class attribute is defined to be binary data. So it won't get printed as ASCII text. It will always get printed as hex data.
Is it possible to write the actual value in the database and in the log file?
It is writing the actual data. As for why Class isn't in the DB, run the server in debug mode to see what it's doing. If the Class attribute is in the Accounting-Request packets, then it will be written to the DB. My guess is that the "log file" you refer to is for Access-Accept packets. It helps to give enough information that people can help you. The more vague your questions are, the more vague the answers will be. Alan DeKok.
Hi, Jorge, Thanks - will test it out. i'm on v3.0.23-2 (Ubuntu) Alan, Yes in the Access Accept (reply-detail/post-proxy-detail/detail files. In debug mode I can see the Class in the Accounting-Request. Debug: https://pastebin.com/gF0rzjMm Regards, Pizu On Thu, 26 Aug 2021 at 20:41, Alan DeKok <aland@deployingradius.com> wrote:
On Aug 26, 2021, at 11:57 AM, Pizu <pizpower@gmail.com> wrote:
Currently on the MySQL database the class is remaining NULL and in the log files the class is being written mixed numbers/letters.
log file:
Class = 0x5253534f2d49542d4e6574776f726b696e67
the Class attribute is defined to be binary data. So it won't get printed as ASCII text. It will always get printed as hex data.
Is it possible to write the actual value in the database and in the log file?
It is writing the actual data.
As for why Class isn't in the DB, run the server in debug mode to see what it's doing. If the Class attribute is in the Accounting-Request packets, then it will be written to the DB.
My guess is that the "log file" you refer to is for Access-Accept packets. It helps to give enough information that people can help you. The more vague your questions are, the more vague the answers will be.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Aug 26, 2021, at 5:07 PM, Pizu <pizpower@gmail.com> wrote:
Yes in the Access Accept (reply-detail/post-proxy-detail/detail files. In debug mode I can see the Class in the Accounting-Request.
The SQL queries don't save Class into the accounting table. You will have to use 3.0.23 from http://pakages.nbetworkradius.com, and then edit raddb/mods-config/sql/main/mysql/queries.conf Look for "class {", and then follow the instructions there. Alan DeKok.
Thanks. On Thu, 26 Aug 2021, 23:13 Alan DeKok, <aland@deployingradius.com> wrote:
On Aug 26, 2021, at 5:07 PM, Pizu <pizpower@gmail.com> wrote:
Yes in the Access Accept (reply-detail/post-proxy-detail/detail files. In debug mode I can see the Class in the Accounting-Request.
The SQL queries don't save Class into the accounting table.
You will have to use 3.0.23 from http://pakages.nbetworkradius.com, and then edit raddb/mods-config/sql/main/mysql/queries.conf
Look for "class {", and then follow the instructions there.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi, I did the changes and got the data in the DB. I have also added the class attribute in the dictionary to make it readable. ATTRIBUTE Class 25 string Thanks Alan & Jorge for your help. Regards, Pizu On Thu, 26 Aug 2021 at 23:16, Pizu <pizpower@gmail.com> wrote:
Thanks.
On Thu, 26 Aug 2021, 23:13 Alan DeKok, <aland@deployingradius.com> wrote:
On Aug 26, 2021, at 5:07 PM, Pizu <pizpower@gmail.com> wrote:
Yes in the Access Accept (reply-detail/post-proxy-detail/detail files. In debug mode I can see the Class in the Accounting-Request.
The SQL queries don't save Class into the accounting table.
You will have to use 3.0.23 from http://pakages.nbetworkradius.com, and then edit raddb/mods-config/sql/main/mysql/queries.conf
Look for "class {", and then follow the instructions there.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Pizu <pizpower@gmail.com> writes:
ATTRIBUTE Class 25 string
see http://lists.freeradius.org/pipermail/freeradius-users/2014-March/071190.htm... Bjørn
On Aug 27, 2021, at 5:30 AM, Pizu <pizpower@gmail.com> wrote:
I did the changes and got the data in the DB. I have also added the class attribute in the dictionary to make it readable.
ATTRIBUTE Class 25 string
Don't edit the dictionaries. They will get over-written on the next upgrade, and will remove your changes. Alan DeKok.
Hi, Will remove the attribute from dictionary. Thanks for letting me know. The %{string:Class} where shall I put that? Sorry for asking. Thanks again for your help. On Fri, 27 Aug 2021, 15:23 Alan DeKok, <aland@deployingradius.com> wrote:
On Aug 27, 2021, at 5:30 AM, Pizu <pizpower@gmail.com> wrote:
I did the changes and got the data in the DB. I have also added the class attribute in the dictionary to make it readable.
ATTRIBUTE Class 25 string
Don't edit the dictionaries. They will get over-written on the next upgrade, and will remove your changes.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Aug 27, 2021, at 3:45 PM, Pizu <pizpower@gmail.com> wrote:
Will remove the attribute from dictionary. Thanks for letting me know.
The %{string:Class} where shall I put that? Sorry for asking.
See the SQL queries you're using. i.e. run the server in debug mode, and see where it's loading including configuration file ./raddb/mods-config/sql/.../queries.conf Then edit that file (or those files). Change %{Class} to %{string:Class} But be sure you're doing it only for the fields you *want* to be changed. Alan DeKok.
Thanks. Will try this on Monday. Nice weekend to everyone On Fri, 27 Aug 2021, 22:43 Alan DeKok, <aland@deployingradius.com> wrote:
On Aug 27, 2021, at 3:45 PM, Pizu <pizpower@gmail.com> wrote:
Will remove the attribute from dictionary. Thanks for letting me know.
The %{string:Class} where shall I put that? Sorry for asking.
See the SQL queries you're using. i.e. run the server in debug mode, and see where it's loading
including configuration file ./raddb/mods-config/sql/.../queries.conf
Then edit that file (or those files). Change
%{Class}
to
%{string:Class}
But be sure you're doing it only for the fields you *want* to be changed.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi, This worked for the DB :) however now the logs went back as they were before, is it possible to change these as well? Regards, Pizu On Fri, 27 Aug 2021 at 22:51, Pizu <pizpower@gmail.com> wrote:
Thanks. Will try this on Monday.
Nice weekend to everyone
On Fri, 27 Aug 2021, 22:43 Alan DeKok, <aland@deployingradius.com> wrote:
On Aug 27, 2021, at 3:45 PM, Pizu <pizpower@gmail.com> wrote:
Will remove the attribute from dictionary. Thanks for letting me know.
The %{string:Class} where shall I put that? Sorry for asking.
See the SQL queries you're using. i.e. run the server in debug mode, and see where it's loading
including configuration file ./raddb/mods-config/sql/.../queries.conf
Then edit that file (or those files). Change
%{Class}
to
%{string:Class}
But be sure you're doing it only for the fields you *want* to be changed.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (4)
-
Alan DeKok -
Bjørn Mork -
Jorge Pereira -
Pizu