Modify NAS-Port-Id value in mysql
Hi all, how can I modify NAS-Port-Id attribute value (truncate string operation) before it gets recorded in MySQL database. I've read about ulang and understand that /etc/raddb/sites-enabled/default file should be modified. which section "post-auth", "preacct", "accounting" should I modify ? Is there another way to do it ? Thank you in advance. -- Yannick
I write in authorisation section. First I check NAS-Port exist, split to variables witch check in db Pagarbiai, Giedrius 861569551
On 2021-12-07, at 22:47, Yannick Champs <ychamps@gmail.com> wrote:
Hi all,
how can I modify NAS-Port-Id attribute value (truncate string operation) before it gets recorded in MySQL database. I've read about ulang and understand that /etc/raddb/sites-enabled/default file should be modified. which section "post-auth", "preacct", "accounting" should I modify ? Is there another way to do it ?
Thank you in advance.
-- Yannick - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Dec 7, 2021, at 3:44 PM, Yannick Champs <ychamps@gmail.com> wrote:
how can I modify NAS-Port-Id attribute value (truncate string operation) before it gets recorded in MySQL database.
You use "unlang" to edit it before the "sql" module is run.
I've read about ulang and understand that /etc/raddb/sites-enabled/default file should be modified. which section "post-auth", "preacct", "accounting" should I modify ?
It depends where you're running the SQL module. Run the server in debug mode, and it will show you what it's doing. See where it's running "sql", and then edit that section of the configuration files. All of this is printed out for a reason: so you can easily see what's going on, and which parts of the configuration are being run.
Is there another way to do it ?
No. You have to write local "unlang" policies to do whatever local editing you want to do. Alan DeKok.
participants (3)
-
Alan DeKok -
Giedrius Baronas -
Yannick Champs