auth-type-error

MEjaz mejaz at cyberia.net.sa
Mon Sep 7 14:36:31 CEST 2020


In addition to the below email.  my odbc.ini and odbcinst.ini 

[root at radius-1 ~]#  /etc/odbc.ini
[RADIATOR]
Driver = ODBC Driver 17 for SQL Server
Server = nbdb.cyberia.net.sa
Database = mydatabase

========================================

/etc/odbcinst.ini 
====================================================
ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.6.so.1.1
UsageCount=1

=====================================================

Test my DSN through isql. Works fine. 

[root at radius-1 ~]# isql -v RADIATOR  nbauthuser nbauthuserpass
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>

-----Original Message-----
From: MEjaz [mailto:mejaz at cyberia.net.sa] 
Sent: Monday, September 7, 2020 3:17 PM
To: 'FreeRadius users mailing list' <freeradius-users at lists.freeradius.org>
Subject: RE: auth-type-error

Thanks for your email. 

Based on the documentation,  I updated the sql config file as below, please find the below uncommented lines only FYR.  and refer to the attached full file sql.  

Thanks in advance for your kind assitnace in this. 

Specific section,  Remote sqlserver/database information

===============================================================
        server = "RADIATOR"  ### this is DNS as per the /etc/odbc.ini 
        port = "1433"
        login = "nbauthuser"
        password = "nbauthuserpass"
========================================================================

=====================================================================================================================
[root at radius-1 mods-available]#  grep -v '#' sql


sql {
                mssql
        dialect = "mssql"

                rlm_sql_unixodbc
        driver = "rlm_sql_null"

        sqlite {
                filename = "/tmp/freeradius.db"

                busy_timeout = 200

                bootstrap = "${modconfdir}/${..:name}/main/sqlite/schema.sql"
        }

        mysql {
                tls {
                        ca_file = "/etc/ssl/certs/my_ca.crt"
                        ca_path = "/etc/ssl/certs/"
                        certificate_file = "/etc/ssl/certs/private/client.crt"
                        private_key_file = "/etc/ssl/certs/private/client.key"
                        cipher = "DHE-RSA-AES256-SHA:AES128-SHA"

                        tls_required = yes
                        tls_check_cert = no
                        tls_check_cert_cn = no
                }

                warnings = auto
        }

        postgresql {


                send_application_name = yes
        }

        mongo {
                appname = "freeradius"

                tls {
                        certificate_file = /path/to/file
                        certificate_password = "password"
                        ca_file = /path/to/file
                        ca_dir = /path/to/directory
                        crl_file = /path/to/file
                        weak_cert_validation = false
                        allow_invalid_hostname = false
                }
        }

        server = "RADIATOR"
        port = "1433"
        login = "nbauthuser"
        password = "nbauthuserpass"








        acct_table1 = "CM_WriteCDRnew"

        postauth_table = "RADONLINE"

        authcheck_table = "NB_Authentication_Nesma"

        authreply_table = "NB_Authentication_Nesma"




        delete_stale_sessions = yes




        pool {
                start = ${thread[pool].start_servers}

                min = ${thread[pool].min_spare_servers}

                max = ${thread[pool].max_servers}

                spare = ${thread[pool].max_spare_servers}

                uses = 0

                retry_delay = 30

                lifetime = 0

                idle_timeout = 60

        }


        client_table = "nas"



        group_attribute = "SQL-Group"

        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}

-----Original Message-----
From: Freeradius-Users [mailto:freeradius-users-bounces+mejaz=cyberia.net.sa at lists.freeradius.org] On Behalf Of Alan DeKok
Sent: Monday, September 7, 2020 2:57 PM
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Subject: Re: auth-type-error

On Sep 7, 2020, at 4:58 AM, MEjaz <mejaz at cyberia.net.sa> wrote:
> I am trying to configure FreeRadius 3.0X  with remote MSSQL and 
> unixODBC, all basic tests have been passed sucefully.

  You need to configure the "sql" module, to set "dialect", and maybe "driver".  This is documented in the comments in mods-available/sql.
  
> However, when I run radtest, on my radiusd server, I get the following 
> error ...
> [root at radius-1 ~]#  radtest testnesma at 1024.corp.nesma.net.sa 112233 
> localhost 0 testing123

  We do NOT need to see the output of "radtest".  This is documented everywhere.

> ...
> The 'rlm_sql_null' driver CANNOT be used for SELECTS.
> 
> Please update the 'sql' module configuration to use a real database.
> 
> Set 'driver = ...' to the database you want to use.

  That seems pretty clear.

  It helps to read the comments in the module, and the debug messages that the server produces.

  Alan DeKok.


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




More information about the Freeradius-Users mailing list