FreeTDS + UnixODBC to MSSQL Problems

2013-08-02 Thread Alex Chiodo
Version: FreeRADIUS Version 2.2.0, for host x86_64-pc-linux-gnu, built
on Jul 31 2013 at 15:36:48
OS: Ubuntu 12.04.2 LTS

Hi all-

Having some difficulties with Freeradius connecting to a SQL Server
2008 backend using the unixodbc module. I've recompiled the source
using the --with-rlm_sql_unixodbc flag and the module appears to be
loading fine. However, Freeradius does not seem to be able to
establish a connection with the server. I've configured my
freetds.conf, odbc.ini, and odbcinst.ini files properly because tsql
and isql can both connect to and query the server, but the debug
output from Freeradius gives me the following:

rlm_sql (sql): Driver rlm_sql_unixodbc (module rlm_sql_unixodbc)
loaded and linked
rlm_sql (sql): Attempting to connect to admin@10.10.100.24:49355/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_unixodbc #0
rlm_sql_unixodbc: SQL down 08001 [unixODBC][FreeTDS][SQL Server]Unable
to connect to data source
rlm_sql_unixodbc: Connection failed
rlm_sql (sql): Failed to connect DB handle #0
rlm_sql (sql): starting 1
rlm_sql (sql): starting 2
rlm_sql (sql): starting 3
rlm_sql (sql): starting 4
rlm_sql (sql): Failed to connect to any SQL server.

I'm using the mssql.conf template found at
https://github.com/FreeRADIUS/www.freeradius.org/blob/master/radiusd/raddb/mssql.conf
with the only changes being the connect info (server, login, port,
password), radius_db, and sqltrace, and radiusd.conf has an include
for mssql.conf.

I've tried running Wireshark on the SQL server and both tsql and isql
generate traffic to the server. Upon loading Freeradius, I see
absolutely no traffic coming from the radius server's IP. Any ideas
where my problem could lie?
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: FreeTDS + UnixODBC to MSSQL Problems

2013-08-02 Thread Arran Cudbard-Bell
 I've tried running Wireshark on the SQL server and both tsql and isql
 generate traffic to the server. Upon loading Freeradius, I see
 absolutely no traffic coming from the radius server's IP. Any ideas
 where my problem could lie?

Nope. But you can use the sybase driver as an alternative method of connecting 
to mssql.

Arran Cudbard-Bell a.cudba...@freeradius.org
FreeRADIUS Development Team

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


Re: FreeTDS + UnixODBC to MSSQL Problems

2013-08-02 Thread Alex Chiodo
After confirming there was a
src/modules/rlm_sql/drivers/rlm_sql_sybase directory, I edited
debian/rules to add a --with-rlm_sql_sybase flag and recompiled. Now
I'm receiving this:

Could not link driver rlm_sql_sybase: file not found
Make sure it (and all its dependent libraries!) are in the search path
of your system's ld.

root@FREERAD:/home/administrator# ldconfig -p | grep syb
libsybdb.so.5 (libc6,x86-64) = /usr/lib/x86_64-linux-gnu/libsybdb.so.5
libsybdb.so (libc6,x86-64) = /usr/lib/x86_64-linux-gnu/libsybdb.so

What other libraries are this module dependent on?

On Fri, Aug 2, 2013 at 12:47 PM, Arran Cudbard-Bell
a.cudba...@freeradius.org wrote:
 I've tried running Wireshark on the SQL server and both tsql and isql
 generate traffic to the server. Upon loading Freeradius, I see
 absolutely no traffic coming from the radius server's IP. Any ideas
 where my problem could lie?

 Nope. But you can use the sybase driver as an alternative method of 
 connecting to mssql.

 Arran Cudbard-Bell a.cudba...@freeradius.org
 FreeRADIUS Development Team

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


Re: FreeTDS + UnixODBC to MSSQL Problems

2013-08-02 Thread Arran Cudbard-Bell


 After confirming there was a
 src/modules/rlm_sql/drivers/rlm_sql_sybase directory,

Mm, inventing fictitious SQL drivers is one of my favourite pastimes.

 I edited
 debian/rules to add a --with-rlm_sql_sybase flag and recompiled. Now
 I'm receiving this:
 
 Could not link driver rlm_sql_sybase: file not found
 Make sure it (and all its dependent libraries!) are in the search path
 of your system's ld.
 
 root@FREERAD:/home/administrator# ldconfig -p | grep syb
libsybdb.so.5 (libc6,x86-64) = /usr/lib/x86_64-linux-gnu/libsybdb.so.5
libsybdb.so (libc6,x86-64) = /usr/lib/x86_64-linux-gnu/libsybdb.so
 
 What other libraries are this module dependent on?

Have you checked that the module was actually installed in the FreeRADIUS lib 
dir?

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


Re: FreeTDS + UnixODBC to MSSQL Problems

2013-08-02 Thread Alex Chiodo
 Mm, inventing fictitious SQL drivers is one of my favourite pastimes.

Please forgive my unfamiliarity with the operating system / software..
why would that be a fictitious driver? The wiki page
(http://wiki.freeradius.org/modules/Rlm_sql) lists sybase as a
supported database via the rlm_sql_sybase driver within the 2.2.0
source, in addition to the appropriate client libraries.

 Have you checked that the module was actually installed in the FreeRADIUS lib 
 dir?

Looks like it hasn't been. UnixODBC is in there, but no sybase.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: FreeTDS + UnixODBC to MSSQL Problems

2013-08-02 Thread Arran Cudbard-Bell

 Have you checked that the module was actually installed in the FreeRADIUS 
 lib dir?
 
 Looks like it hasn't been. UnixODBC is in there, but no sybase.

Ok, why don't you just try building from source and worry about the packaging 
later?  Confirm that configure has actually picked up libsybase.  Then you can 
copy the .so 'make' produces out of the staging directory into wherever your 
FreeRADIUS libs dir is.

Arran Cudbard-Bell a.cudba...@freeradius.org
FreeRADIUS Development Team

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