On Fri, Jan 10, 2003 at 08:20:04PM -0800, Don O'Neil wrote:
> Everyone,
>   I'm a newbie here, so please don't hack me to shreds. I've read the FAQ and
> Docs closely, and tried everything I can, but I must be missing something....

OT to this, but think about getting the book RADIUS, from the oreilly
network. has sections on freeradius, and deals with freeradius+mysql in
particular

> 
> I sucsessfully built v81 of FreeRadius on my server, and I can properly
> authenticate using the USERS file, and demo user of 'steve'....


> 
> However, for whatever reason, I cannot get the server to connect to the mySQL
> database to look up users there, and the dialup_admin program can't seem to add
> or edit users because of this.

i suspect that when you built freeradius, it couldn't find the MySQL
development files. make sure you've got any development packages for
mysql installed on your server (or whatever host you built freeradius
on).

if they're not available through /usr/include or /usr/local/include,
then you'll need to specify
./configure --with-rlm-mysql-lib-dir=/path
--with-rlm-mysql-include-dir=/path

but if you're using the more common linux distributions (for example)
typically, the packages install these files in /usr/lib|/usr/include,
and they'll be found automatically.

> 
> I know the DB is working, as I can connect to it using mysql, or phpmyadmin. The
> tables are there, as per the schema for both apps.
> 
> I'm thinking that I missed a configure option when I built it, but a
> configure --help doesn't say anything about mysql. I've properly configured the

try and find a file called "mysql.h" somewhere on your system, or the
provided packages for mysql (client development packages or whatever)
once that's installed, configure will probably just work.
> 
> Now, there is no module in my /usr/local/lib directory called rlm_sql_mysql...
> there is one called rlm_sql though, nor is there source for such a module name.
> So, in the sql.conf file I changed the driver from 'rlm_sql_mysql' to
> 'rlm_sql'... and then the server just hangs with this in the log:

unfortunately, you got that part wrong. rlm_sql is a wrapper around the
various rlm_sql_* libraries, to allow radius to have a
write-once-use-many approach to SQL servers. the particular server is
chosen inside sql.conf, and iirc, mysql is the default.

> 
> Fri Jan 10 20:13:32 2003 : Info: rlm_sql (sql): Driver rlm_sql (module SQL)
> loaded and linked
> Fri Jan 10 20:13:32 2003 : Info: rlm_sql (sql): Attempting to connect to
> root@localhost:/radius
> 
> running radiusd -X results in the following:
> 
> rlm_sql (sql): Driver rlm_sql (module SQL) loaded and linked
> rlm_sql (sql): Attempting to connect to root@localhost:/radius
> rlm_sql (sql): starting 0
> rlm_sql (sql): Attempting to connect SQL #0
> Segmentation fault

you get the segmentation fault, probably because radiusd isn't doing
strict function-name checking on the rlm modules, and didn't notice that
the functions it needed were available. then it tries to call a
non-existant function, and *boom*.

> 
> Any clues as to what I'm doing wrong here? Maybe the MySQL module just got left
> out of the .81 distrib?

it's definently there :)

> 
> I'm running this on a FreeBSD 4.5 system.

right. if you've installed the mysql port, it's probably added itself to
/usr/local/somedir. use /usr/local/somedir/include and
/usr/local/somedir/lib as the /path options i mentioned near the top.


Andrew 'ashridah' Pilley

> 
> Thanks!
> Don
> 
> 
> 
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to