rlm_sql_unixodbc: Driver Link failure when running radiusd -X

Alan DeKok aland at deployingradius.com
Thu Nov 25 16:01:13 CET 2021


On Nov 25, 2021, at 9:50 AM, Clive Allen <cliveallen0907 at gmx.com> wrote:
>   Firstly, my apologies if this is not freeradius related but am hoping
>   someone may have seen this before or could point me in the right
>   direction please:
> 
>   I am trying to connect to an mssql database with freeradius on redhat.

  If you're using the RedHat packages, then perhaps ask RedHat about that.

>   When running radiusd -X I am getting the following readout (error):
> 
>   Nov 25 13:40:27 rhmssql1 radiusd[7698]: Creating attribute Unix-Group
>   Nov 25 13:40:27 rhmssql1 radiusd[7698]: Could not link driver
>   rlm_sql_unixodbc: /usr/lib64/freeradius/rlm_sql_unixodbc.so: cannot
>   open shared object file: No such file or directory

  i.e. you're trying to use a module without having it installed.
> 
>   I have checked the directory /usr/lib64/freeradius/ and sure enough the
>   file rlm_sql_unixodbc.so does not exist there.

  Exactly.

>   I have tested with isql -v rhmssql1 radius radPass_123 and that works
>   fine. I can also access the DB with either radius or SA.
> 
>   I have configured /etc/odbc.ini with the following:

  That's ODBC.  It's needed, but it's not enough. You also need the rlm_sql_unixodbc.so file.

>   I have checked the locations as follows:
> 
>   [root at rhmssql1 lib64]# ldd
>   /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.2

  That's irrelevant.

  "I can't find rlm_sql_unixodbc, but there are a bunch of other libraries on the system!"


>   I have also followed the excellent process doument at
>   https://wiki.freeradius.org/modules/Rlm_sql_unixodbc and everything
>   works as should except the very last stage (start up of freeradius).
>   Excuse my picking up on this as it is a typo I expect - but in there
>   you have labelled port "1443" under the DSN (Section 4:Server =
>   tcp:192.0.2.1, 1443 and suspect you meant 1433).

  The Wiki is editable for a reason.  Perhaps it can be fixed?

>   In the /etc/raddb/mods-available - I completed the following changes:
>   sql {
>         dialect = "mssql"
>         driver = "rlm_sql_unixodbc"

  Did you make sure that the rlm_sql_unixodbc driver was installed?

>   Again, many apologies if the answer to this is obvious (which I know it
>   is from the error) but this e-mail has been a last resort. There are
>   articles on the wiki but they are from 2007 and 2008.
> 
>   I have completed a "find" for the named file and cannot find it "find /
>   -name "*rlm_sql*"

  So you didn't install *any* of the SQL modules for FreeRADIUS. Perhaps try that?

  Search the RedHat RPMs for "freeradius" and "sql".  Then, install the relevant packages.

  Alan DeKok.




More information about the Freeradius-Users mailing list