use freeeradius 3.0.2 with sqlite fail when loading modules

kids67.tw kids67.tw at yahoo.com.tw
Wed Apr 2 03:33:19 CEST 2014


Dear Sir,



I complier freeradius 3.0.2 with sqlite enable and complier successful.
But when I run ./radiusd -XC -d ./raddb/ then display below error

......
  # Instantiating module "linelog" from file ./raddb//mods-enabled/linelog
  linelog {
        filename = "/home/saxontseng/senao_ source/ap_controller/ freeradius/install/LINUX/var/ log/radius/linelog"
        permissions = 384
        format = "This is a log message for %{User-Name}"
        reference = "%{%{Packet-Type}:-format}"
  }
./raddb//mods-enabled/sql[26]: Failed to link to module 'rlm_sqlite': rlm_sqlite.so: cannot open shared object file: No such file or directory

And after I check I find only have "rlm_sql_sqlite.so", not find any rlm_sqlite.so.

I just modify site-enable/default and mod-available/sql, make ln to mod-enabled/sql
below is my diff with those two config file

--- mods-available/sql  2014-04-01 15:14:36.935046321 +0800
+++ /home/saxontseng/freeradius- server-3.0.2/raddb/mods- available/sql   2014-03-21 20:27:25.000000000 +0800
@@ -23,15 +23,15 @@
 #
 #  Driver specific options are:
 #
-  sqlite {
-       # Path to the sqlite database
-       filename = "$(PWD)/bin/LINUX/radius.db"
-
-       # If the file above does not exist and bootstrap is set
-       # a new database file will be created, and the SQL statements
-       # contained within the file will be executed.
-       bootstrap = "$(PWD)/bin/LINUX/freeradius/ etc/raddb/mods-config/sql/ main/sql_sqlite/schema.sql"
-  }
+#  sqlite {
+#      # Path to the sqlite database
+#      filename = "/my/sqlite/database.db"
+#
+#      # If the file above does not exist and bootstrap is set
+#      # a new database file will be created, and the SQL statements
+#      # contained within the file will be executed.
+#      bootstrap = "/my/sqlite/schema.sql"
+#  }
 #
 #  mysql {
 #      # If any of the below files are set tls encryption is enabled
@@ -55,14 +55,14 @@
        #    * rlm_sql_sqlite
        #    * rlm_sql_null (log queries to disk)
        #
-       driver = "rlm_sql_sqlite"
+       driver = "rlm_sql_null"

        # The dialect of SQL you want to use, this should usually match
        # the driver you selected above.
        #
        # If you're using rlm_sql_null, then it should be the type of
        # database the logged queries are going to be executed against.
-       dialect = "sqlite"
+       dialect = "mysql"

        # Connection info:
        #
@@ -110,7 +110,7 @@

        # Write SQL queries to a logfile. This is potentially useful for tracing
        # issues with authorization queries.
-       logfile = ${logdir}/sqllog.sql
+#      logfile = ${logdir}/sqllog.sql

        #  As of version 3.0, the "pool" section has replaced the
        #  following configuration items:
--- sites-enabled/default       2014-04-01 14:03:20.544123741 +0800
+++ /home/saxontseng/freeradius- server-3.0.2/raddb/sites- available/default      2014-03-21 20:27:25.000000000 +0800
@@ -252,7 +252,7 @@
        #  If you want to have a log of authentication requests,
        #  un-comment the following line, and the 'detail auth_log'
        #  section, above.
-       auth_log
+#      auth_log

        #
        #  The chap module will set 'Auth-Type := CHAP' if we are
@@ -271,7 +271,7 @@
        #  If you have a Cisco SIP server authenticating against
        #  FreeRADIUS, uncomment the following line, and the 'digest'
        #  line in the 'authenticate' section.
-#      digest
+       digest

        #
        #  The WiMAX specification says that the Calling-Station-Id
@@ -328,14 +328,14 @@

        #
        #  Read the 'users' file
-#      files
+       files

        #
        #  Look in an SQL database.  The schema of the database
        #  is meant to mirror the "users" file.
        #
        #  See "Authorization Queries" in sql.conf
-       sql
+       -sql

        #
        #  If you are using /etc/smbpasswd, and are also doing
@@ -434,7 +434,7 @@
        #  If you have a Cisco SIP server authenticating against
        #  FreeRADIUS, uncomment the following line, and the 'digest'
        #  line in the 'authorize' section.
-#      digest
+       digest

        #
        #  Pluggable Authentication Modules.
@@ -548,7 +548,7 @@
        #  Update the wtmp file
        #
        #  If you don't use "radlast", you can delete this line.
-#      unix
+       unix

        #
        #  For Simultaneous-Use tracking.
@@ -565,7 +565,7 @@
        #  Log traffic to an SQL database.
        #
        #  See "Accounting queries" in sql.conf
-       sql
+       -sql

        #
        #  If you receive stop packets with zero session length,
@@ -613,7 +613,7 @@

        #
        #  See "Simultaneous Use Checking Queries" in sql.conf
-       sql
+#      sql
 }


@@ -639,7 +639,7 @@
        #  After authenticating the user, do another SQL query.
        #
        #  See "Authentication Logging Queries" in sql.conf
-       sql
+       -sql

        #
        #  Instead of sending the query to the SQL server,
@@ -742,7 +742,7 @@
        #
        Post-Auth-Type REJECT {
                # log failed authentications in SQL, too.
-               sql
+               -sql
                attr_filter.access_reject

                # Insert EAP-Failure message if the request was


Does my config have wrong? How to config will make 3.0.2 run with sqlite?

Regards,
SaxonTseng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/mailman/private/freeradius-users/attachments/20140402/cff58953/attachment.html>


More information about the Freeradius-Users mailing list