[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: Modify NAS-Port-Id value in mysql
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2021-12-07 21:11:47
Message-ID: CB571E5F-4A2E-43D2-B94D-68687AEEFB54 () deployingradius ! com
[Download RAW message or body]

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.


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic