How to integrate Freeradius with Oracle Database XE(18c)?

Alan DeKok aland at
Tue Mar 31 14:31:56 CEST 2020

On Mar 31, 2020, at 1:20 AM, Sajib Nandi <sajib.aece at> wrote:
> I installed oracle-instantclient18.5
> yum localinstall oracle-instantclient18.5-basic-
> yum localinstall oracle-instantclient18.5-sqlplus-
> yum localinstall oracle-instantclient18.5-devel-
> The various packages installed into subdirectories of
> /usr/lib/oracle
> /usr/include/oracle and
> /usr/share/oracle

  That's good.

> I followed mentioned link for building the rlm_sql_oracl , I think this
> instraction not fully clear, I used below command for building the
> rlm_sql_oracle module intoFreeradius
> #cd
> /usr/local/freeradius-server-3.0.20/src/modules/rlm_sql/drivers/rlm_sql_oracle
> #./configure --with-oracle-lib-dir=/usr/lib/oracle/18.5/client64/lib
> --with-oracle-include-dir=/usr/include/oracle/18.5/client64
> But make and make install command does not work
> I see there is no Makefile

  There should be a file 'src/modules/rlm_sql/drivers/rlm_sql_oracle/

  You can edit this file directly if necessary.

> 1. maybe  I was wrong with building the rlm_sql_oracle module
> can you tell me how to build the rlm_sql_oracle module?

  That should work.  And, see below...

> 2. or I was wrong with oracle database connect:
> vi /usr/local/etc/raddb/mods-available/sql
> dialect = "oracle"
> driver = "rlm_sql_${dialect}"
> server = "radius/radius at"
> radius_db =
> is this right?
> when I go to debugging mode I got following Error
> radiusd -X
> ---------cut-----------
> ...
> rlm_sql (sql): Opening additional connection (0), 1 of 32 pending slots used
> rlm_sql_oracle: Oracle logon failed: 'ORA-12154: TNS:could not resolve the
> connect identifier specified '

  You build the rlm_sql_oracle module correctly.  That's good.

  The issue now is Oracle.  It doesn't like that "radius_db" string, *or* something else.  It's hard to say, as we're not Oracle people.

  A quick google search yields this, which might help:

  If it still fails after that, call Oracle.  I presume you have support...

  Once rlm_sql_oracle is built and returning errors from Oracle, there's little more we can do.  The errors come from Oracle, not from FreeRADIUS.

  Alan DeKok.

More information about the Freeradius-Users mailing list