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

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


On Mar 31, 2020, at 1:20 AM, Sajib Nandi <sajib.aece at gmail.com> wrote:
> I installed oracle-instantclient18.5
> yum localinstall oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm
> yum localinstall oracle-instantclient18.5-sqlplus-18.5.0.0.0-3.x86_64.rpm
> yum localinstall oracle-instantclient18.5-devel-18.5.0.0.0-3.x86_64.rpm
> 
> 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/all.mk

  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 113.21.228.14:1521/xepdb1"
> radius_db =
> "DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=113.21.228.14)(PORT=1521))(CONNECT_DATA=(SID=XE)))"
> 
> 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:

https://community.oracle.com/thread/3510766?start=0&tstart=0

  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