I am installing freeradius on Openwrt. Freeradius2, freeradius2-mod-sql-sqlite and libsqlite3 have been installed. Now, I can create database but I don't know how to connect freeradius with sqlite database. Does anyone know how?
On 30 Aug 2013, at 12:54, Nong NgocDung <nongdung@gmail.com> wrote:
I am installing freeradius on Openwrt. Freeradius2, freeradius2-mod-sql-sqlite and libsqlite3 have been installed. Now, I can create database but I don’t know how to connect freeradius with sqlite database. Does anyone know how?
Yeah it's the 'filename' config item in sql.conf. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
Hi Arran, I know and I can make FR work with mysql, but I don't have any sql.conf example that works with sqlite. Could you give an example sql.conf file? Thanks & best regards, NgocDung Nong (Mr) On 30-08-2013, at 19:09, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 30 Aug 2013, at 12:54, Nong NgocDung <nongdung@gmail.com> wrote:
I am installing freeradius on Openwrt. Freeradius2, freeradius2-mod-sql-sqlite and libsqlite3 have been installed. Now, I can create database but I don’t know how to connect freeradius with sqlite database. Does anyone know how?
Yeah it's the 'filename' config item in sql.conf.
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 30 Aug 2013, at 15:48, NgocDung Nong <nongdung@gmail.com> wrote:
Hi Arran,
I know and I can make FR work with mysql, but I don't have any sql.conf example that works with sqlite. Could you give an example sql.conf file?
The default sql.conf file will work with sqlite. The queries however may not. version 3.0.0 has queries specifically for sqlite, so you may want to try that. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
Hi Arran, In sql.conf as follow: ------------------------------------------------------------ sql { # # Set the database to one of: # # mysql, mssql, oracle, postgresql # database = "mysql" # # Which FreeRADIUS driver to use. # driver = "rlm_sql_${database}" # Connection info: server = "localhost" ..................... } ---------------------------------------------------------------- Where should I declare the connection to sqlite file? -----Original Message----- From: freeradius-users-bounces+nongdung=gmail.com@lists.freeradius.org [mailto:freeradius-users-bounces+nongdung=gmail.com@lists.freeradius.org] On Behalf Of Arran Cudbard-Bell Sent: Friday, August 30, 2013 10:01 PM To: FreeRadius users mailing list Subject: Re: Freeradius2 and sqlite On 30 Aug 2013, at 15:48, NgocDung Nong <nongdung@gmail.com> wrote:
Hi Arran,
I know and I can make FR work with mysql, but I don't have any sql.conf example that works with sqlite. Could you give an example sql.conf file?
The default sql.conf file will work with sqlite. The queries however may not. version 3.0.0 has queries specifically for sqlite, so you may want to try that. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 31 Aug 2013, at 16:10, "Nong NgocDung" <nongdung@gmail.com> wrote:
Hi Arran,
In sql.conf as follow:
------------------------------------------------------------ sql { # # Set the database to one of: # # mysql, mssql, oracle, postgresql # database = "mysql"
# # Which FreeRADIUS driver to use. # driver = "rlm_sql_${database}"
# Connection info: server = "localhost" ..................... } ----------------------------------------------------------------
Where should I declare the connection to sqlite file?
With the 'filename' config item, and you need to set database to 'sqlite' sql { database = 'sqlite' filename = '<path to sqlite file>' } It's done properly in 3.0. It's sort of hacked into 2.x.x. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
Dear Arran, Finally, I could connect freeradius2 to sqlite on OpenWrt, but the config item "filename" does not affect: sql { database = 'sqlite' filename = '<path to sqlite file>' } It always connects to a sqlite database with the name of "sqlite_radius_client_database" under /etc/freeradius2 folder. Do you know how to customize this database file? For example, If I want connect to myproject.db Thank you, NgocDung Nong -----Original Message----- From: freeradius-users-bounces+nongdung=gmail.com@lists.freeradius.org [mailto:freeradius-users-bounces+nongdung=gmail.com@lists.freeradius.org] On Behalf Of Arran Cudbard-Bell Sent: Saturday, August 31, 2013 10:28 PM To: FreeRadius users mailing list Subject: Re: Freeradius2 and sqlite On 31 Aug 2013, at 16:10, "Nong NgocDung" <nongdung@gmail.com> wrote:
Hi Arran,
In sql.conf as follow:
------------------------------------------------------------ sql { # # Set the database to one of: # # mysql, mssql, oracle, postgresql # database = "mysql"
# # Which FreeRADIUS driver to use. # driver = "rlm_sql_${database}"
# Connection info: server = "localhost" ..................... } ----------------------------------------------------------------
Where should I declare the connection to sqlite file?
With the 'filename' config item, and you need to set database to 'sqlite' sql { database = 'sqlite' filename = '<path to sqlite file>' } It's done properly in 3.0. It's sort of hacked into 2.x.x. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 1 Sep 2013, at 16:19, Nong NgocDung <nongdung@gmail.com> wrote:
Dear Arran,
Finally, I could connect freeradius2 to sqlite on OpenWrt, but the config item "filename" does not affect: sql { database = 'sqlite'
filename = '<path to sqlite file>' }
It always connects to a sqlite database with the name of "sqlite_radius_client_database" under /etc/freeradius2 folder. Do you know how to customize this database file? For example, If I want connect to myproject.db
https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/src/modules/rlm_... By changing the value of filename. If it's not working you may have a very old version of FreeRADIUS. You should try upgrading to the latest released version. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
participants (3)
-
Arran Cudbard-Bell -
NgocDung Nong -
Nong NgocDung