MSSQL on Redhat - nas table for freeradius

Clive Gwyther 96 Reputation points
2021-11-28T12:15:38.757+00:00

I am configuring and testing mssql server 2019 on Redhat 7.9 and have the following issue:

When importing the schema for mysql there is a nas table entry, however, for mssql the nas table entry is not there.

I have converted the mysql code into mssql code to create a nas table and can enter data into the table via either command line or "Heidi SQL". However, the issue occurs when I run the radtest command. If I use the following credentials as an example:

nas table:
Server = <my freeradius address>
Shortname = <Whatever, does not really matter>
Secret = anything

radcheck table:
User = clive
Attribute = Cleartext-Password
Value = test123
OP = :=

Now I run the radtest statement:

radtest clive test123 localhost 1812 anything --- This does not even contact the database as I see absolutely nothing being returned. However, if I type the following:

radtest clive test123 localhost 1 testing123 ---- This all works and I get the access accept. The returned response shows the local server as the nas address but that could be because I used localhost.

This suggests that the radcheck is being returned fine but the "nas" table does not look like it is being read at all.

There appears to be no documentation surrounding this issue and hoping someone may have seen this before and knows a workaround.

Is the "nas" table actually supported given that it is missing from the mssql schema for freeradius?

Any help appreciated. Many thanks.

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Clive Gwyther 96 Reputation points
    2021-11-28T13:34:11.133+00:00

    Hi ErlandSommarskog,

    Thank you for the answer.

    I believe I have found the resolution to this issue and was about to update when your answer came through.

    There is a file called sql located in /etc/raddb/mods-available/sql

    In that file there is a line that states "read_clients = yes" .... as a default this line is commented out and the "clients" it mentions are taken from the "nas" table. I uncommented that line and restarted the mssql-server and now the nas table is being read correctly.

    Again, many thanks for the response.


1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 122K Reputation points MVP Volunteer Moderator
    2021-11-28T13:19:16.067+00:00

    I am completely unfamiliar with "freeradius", but it does not sound like something that ships with SQL Server, or even something that comes from Microsoft.

    My gut feeling is that you should find a forum where they discuss Freeradius and where they may know differences between different platforms.

    What I can say from a pure SQL Server perspective is that you can use Trace or Extended Events to see which commands that radtest actually submits on SQL Server.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.