On 14-Jul-09, at 3:06 PM, Gabriel Blanchard wrote:
Well it appears that rlm_sql_sqlite definitely works. Although I don't see any reason to use it other than authentication.
sqlite> INSERT INTO radreply (username, attribute, op, value) Values ('test@test', 'Password', '==','test'); sqlite> .quit
$ echo "User-Name=test@test,Password=test,Framed-Protocol=PPP " | / usr/ local/bin/radclient 127.0.0.1 auth testing123 Received response ID 43, code 2, length = 38 User-Password = "test"
Sorry for being rather noisy today. Fixed up a few stupid mistakes in my syntax and the schema for radreply and radcheck $ sqlite3 sqlite_radcheck.db SQLite version 3.4.0 Enter ".help" for instructions sqlite> CREATE TABLE radcheck ( ...> id integer not null primary key, ...> username varchar(64) NOT NULL default '', ...> attribute varchar(64) NOT NULL default '', ...> op char(2) NOT NULL DEFAULT '=', ...> value varchar(253) NOT NULL default '' ...> ) ; sqlite> CREATE TABLE radreply ( ...> id integer not null primary key, ...> username varchar(64) NOT NULL default '', ...> attribute varchar(64) NOT NULL default '', ...> op char(2) NOT NULL DEFAULT '=', ...> value varchar(253) NOT NULL default '' ...> ) ; sqlite> INSERT INTO radcheck (username, attribute, op, value) Values ('test@test', 'Cleartext-Password', ':=','test'); sqlite> INSERT INTO radreply (username, attribute, op, value) Values ('test@test', 'Framed-IP-Address', '+=','127.0.0.1'); echo "User-Name=test@test,Password=test,Framed-Protocol=PPP " | /usr/ local/bin/radclient 127.0.0.1 auth testing123 Received response ID 54, code 2, length = 26 Framed-IP-Address = 127.0.0.1 [sql] User found in radcheck table [sql] expand: SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radreply WHERE username = 'test@test' ORDER BY id rlm_sql_sqlite: sqlite3_prepare() = 0 rlm_sql_sqlite: sqlite3_step = 100 rlm_sql_sqlite: sqlite3_step = 101 rlm_sql_sqlite: sqlite3_finalize() = 0 rlm_sql (sql): Released sql socket id: 4 ++[sql] returns ok