auth-type-error

MEjaz mejaz at cyberia.net.sa
Sun Sep 20 17:33:57 CEST 2020


Hi, alaan. 

 

So far I have successfully achieved the below request type through radpingutility 

 

*         Authentication 

*         Accounting start  

*         Accounting stop 

 

Now only remaining is to set default simultaneous-use  to 1.  As  i want to limit user's behavior, such as a username can login only once at the same time... 

 

But got error as  “rlm_sql_unixodbc: 22002 [Microsoft][ODBC Driver 17 for SQL Server]Indicator variable required but not supplied (2) sql: ERROR: Error fetching row”  debug is attached fyi. 

 

 

1、modifiy default and inner-tunnel in

 

#  Session database, used for checking Simultaneous-Use. Either the radutmp 

#  or rlm_sql module can handle this.

#  The rlm_sql module is *much* faster

session {

        #radutmp

 

        #  See "Simultaneous Use Checking Querie" in sql.conf

        sql

 

}

 

2、modify queris.coonf  in /usr/local/etc/raddb/mods-config/sql/main/mssql, 

 

below statment i have copeied from /usr/local/etc/raddb/mods-config/sql/main/mysql/quries.conf, as it was not exists  by default  under the msssql/queries.coonf

 

 

 

# added this  simul_count_query to enable simultaneous use checking

 

 

#######################################################################

# Simultaneous Use Checking Queries

#######################################################################

# simul_count_query     - query for the number of current connections

#                       - If this is not defined, no simultaneous use checking

#                       - will be performed by this module instance

# simul_verify_query    - query to return details of current connections

#                               for verification

#                       - Leave blank or commented out to disable verification step

#                       - Note that the returned field order should not be changed.

#######################################################################

 

simul_count_query = "\

        SELECT COUNT(*) \

        FROM ${acct_table1} \

        WHERE username = '%{SQL-User-Name}' \

        AND acctstoptime IS NULL"

 

simul_verify_query = "\

        SELECT \

                radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress, \

                callingstationid, framedprotocol \

        FROM ${acct_table1} \

        WHERE username = '%{SQL-User-Name}' \

        AND acctstoptime IS NULL"

 

 

 

3、add a entry to the table radgorucheck 

INSERT INTO `radgroupcheck` ( `id` , `GroupName` , `Attribute` , `op` , `Value` ) 

VALUES ( 

NULL , ’user’, ’Simultaneous-Use’, ’:=’, ’1’

);

 

4. update the user "test"  to the group "user"

 

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

 

Dear alan, 

 

Thanks for putting me in the right direction. Yes,  all the answers are available in the comment section, indeed great help 

 

however driver  Problem is fixed after setting the  right  driver.

 

 

Really sorry to bother you but one more issue below is in short attached is the full debug. Would be great help, if you can take look. 

 

0) suffix: Checking for suffix after "@"

(0) suffix: Looking up realm "1024.corp.nesma.net.sa" for User-Name = " <mailto:testnesma at 1024.corp.nesma.net.sa> testnesma at 1024.corp.nesma.net.sa"

(0) suffix: No such realm "1024.corp.nesma.net.sa"

(0)     [suffix] = noop

(0) eap: No EAP-Message, not doing EAP

(0)     [eap] = noop+

(0)     [files] = noop

(0) sql: EXPAND %{User-Name}

(0) sql:    -->  <mailto:testnesma at 1024.corp.nesma.net.sa> testnesma at 1024.corp.nesma.net.sa

(0) sql: SQL-User-Name set to 'testnesma at 1024.corp.nesma.net.sa'

rlm_sql (sql): Reserved connection (0)

(0) sql: EXPAND SELECT select password, replyattr, checkattr FROM NB_Authentication_Nesma WHERE Username = '%{User-Name}' ORDER BY id

(0) sql:    --> SELECT select password, replyattr, checkattr FROM NB_Authentication_Nesma WHERE Username = 'testnesma at 1024.corp.nesma.net.sa' ORDER BY id

(0) sql: Executing select query: SELECT select password, replyattr, checkattr FROM NB_Authentication_Nesma WHERE Username = 'testnesma at 1024.corp.nesma.net.sa' ORDER BY id

rlm_sql_unixodbc: 42000 [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword 'select'.

(0) sql: ERROR: Unknown error

(0) sql: ERROR: SQL query error getting reply attributes rlm_sql (sql): Released connection (0)

 

 

 

-----Original Message-----

From: Freeradius-Users [ <mailto:freeradius-users-bounces+mejaz=cyberia.net.sa at lists.freeradius.org> mailto:freeradius-users-bounces+mejaz=cyberia.net.sa at lists.freeradius.org] On Behalf Of Alan DeKok

Sent: Monday, September 7, 2020 6:58 PM

To: FreeRadius users mailing list < <mailto:freeradius-users at lists.freeradius.org> freeradius-users at lists.freeradius.org>

Subject: Re: auth-type-error

 

On Sep 7, 2020, at 10:47 AM, MEjaz < <mailto:mejaz at cyberia.net.sa> mejaz at cyberia.net.sa> wrote:

> As advised, I have tried set the MSSQL driver in SQL  file but when I set this,  ran into different problem with  "could not link driver rlm_sql_mssqlo" 

 

  SYou need the correct driver installed.  As I've said repeatedly, the comments in the sql module tell you exactly what to do.

 

  And no, the comments do *not* say "use driver rlm_sql_mssql".  Instead, they give explicit instructions.

 

> Whereas I have successfully  installed this MS-tools and I have made sure as below. 

> 

> [root at radius-1 ~]# rpm -qa | grep odbc

> msodbcsql17-17.6.1.1-1.x86_64

> [root at radius-1 ~]# rpm -qa | grep -i unix

> unixODBC-devel-2.3.7-1.rh.x86_64

> unixODBC-2.3.7-1.rh.x86_64

> 

> would this be enough or do we need to install any other dependencies. Please assist. 

 

  None of those options are an "rlm_sql" driver.  You can tell, because they don't have "rlm_sql" in their name.

 

  You need to search your local system for the *correct* driver.  Use the names which are in the "sql" module configuration.

 

  It really does help to READ THE DOCUMENTATION, and to READ THE COMMENTS IN THE CONFIGURATION FILES.

 

  Most of your questions are answered in the documentation and/or the configuration files.  Just.... read them.

 

  Alan DeKok.

 

 

-

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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debug.txt
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20200920/ed4a4886/attachment-0001.txt>


More information about the Freeradius-Users mailing list