MSSQL - unixodbc errors

Posted on

Hi,

OS: RHEL 7.9
SQL: MSSQL

I am testing connectivity between freeradius and an MSSQL database and have installed all the required components as specified on the freeradius and Microsoft URLs.

Once I have create a DSN (/etc/odbc.in) which points to the unixodbc driver version in odbcinst.ini:

odbc.ini:
[rhmssql1]
Driver = ODBC Driver 17 for SQL Server
Database = radius
Server = 192.168.152.107

odbcinst.ini:
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.2
UsageCount=1

I have checked to confirm that "libmsodbcsql-17.8.so.1.2" exists in the required location and it does.

All the readouts show that unixODBC is installed along with the msodbc files, however, when I try to run radius -X I get the following error:

Could not link driver rlm_sql_unixodbc: /usr/lib64/freeradius/rlm_sql_unixodbc.so: cannot open shared object file: No such file or directory
Make sure it (and all its dependent libraries!) are in the search path of your system's ld

When I browse to "/usr/lib64/freeradius/" sure enough, rlm_sql_unixodbc.so is not there.

I have asked on the freeradius mailing list who have pointed me back in redhats direction. I have also googled this and cannot find anything to help.

Has anyone seen this error before and how to overcome this issue please?