rlm_sql
Synopsis
Configuration for the SQL module. The database schemas and queries are located in subdirectories:
sql/<DB>/main/schema.sql |
Schema |
sql/<DB>/main/queries.conf |
Authorisation and Accounting queries |
Where DB is mysql, mssql, oracle, or postgresql.
Processing Sections
Any.
Expansions
None.
Directives
- Syntax
-
acct_table1 = string
- Default
-
radacct
- Description
-
Used in conjunction with
acct_table2. If you want bothstopandstartrecords logged to the sameSQLtable, leave the settings identical (default settings). If you want them in different tables, put the start table inacct_table1and the stop table inacct_table2.
- Syntax
-
acct_table2 = string
- Default
-
radacct
- Description
-
Used in conjunction with
acct_table1. If you want bothstopandstartrecords logged to the sameSQLtable, leave the settings identical (default settings). If you want them in different tables, put the start table inacct_table1and the stop table inacct_table2.
- Syntax
-
authcheck_table = string
- Default
-
radcheck
- Description
-
In conjunction with
groupcheck_table, tables containingcheckitems.
- Syntax
-
authreply_table = string
- Default
-
radreply
- Description
-
In conjunction with
groupreply_table, tables containingreplyitems.
- Syntax
-
deletestalesessions = boolean
- Default
-
yes
- Description
-
Removes stale session if
checkraddoes not see a double login.
- Syntax
-
dialect = string
- Default
-
mysql
- Description
-
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 against which the logged queries will be executed.
- Syntax
-
driver = string
- Default
-
rlm_sql_null
- Description
-
The submodule to use to execute queries. This should match the database to which you are attempting to connect: rlm_sql_mysql, rlm_sql_mssql, rlm_sql_oracle, rlm_sql_postgresql, or rlm_sql_null (log queries to disk).
- Syntax
-
groupcheck_table = string
- Default
-
radgroupcheck
- Description
-
In conjunction with
authcheck_table, tables containingcheckitems.
- Syntax
-
groupreply_table = string
- Default
-
radgroupreply
- Description
-
In conjunction with
authreply_table, tables containingreplyitems.
- Syntax
-
login = string
- Default
-
radius
- Description
-
Connection info.
- Syntax
-
nas_table = string
- Default
-
nas
- Description
-
Table in which to keep radius client info.
- Syntax
-
password = string
- Default
-
radpass
- Description
-
Connection info.
- Syntax
-
port = integer
- Default
-
3306
- Description
-
Connection info.
- Syntax
-
postauth_table = string
- Default
-
radpostauth
- Description
-
Allows for storing data after authentication.
- Syntax
-
radius_db = string
- Default
-
radius
- Description
-
Database table configuration for everything except
Oracle. If you are usingOraclethen use the following default setting forradius_db:"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"
- Syntax
-
readclients = boolean
- Default
-
yes
- Description
-
Set to
yesto read radius clients from the database (nastable). Clients will ONLY be read on server startup. For performance and security reasons, finding clients via SQL queries CANNOT be donelivewhile the server is running.
- Syntax
-
read_groups = boolean
- Default
-
yes
- Description
-
If set to
yes(default) the group tables are read. If set tono, the user MUST haveFall-Through = Yesin theradreplytable.
- Syntax
-
server = hostname
- Default
-
localhost
- Description
-
Connection info.
- Syntax
-
sqltrace = boolean
- Default
-
no
- Description
-
Prints all
SQLstatements when in debug mode (-x).
- Syntax
-
sqltracefile = string
- Default
-
${logdir}/sqltrace.sql
- Description
-
FIXME
- Syntax
-
usergroup_table = string
- Default
-
radusergroup
- Description
-
Table to keep group info.
- Syntax
-
pool { … } - Description
-
A sub-section which manages connections to the database. See the pool documentation for more information.