RE: Debian build the freeradius package with unixodbc support

2012-11-23 Thread Dominick Rivard


 -Original Message-
 From: freeradius-users-bounces+drivard=datavalet@lists.freeradius.org
[mailto:freeradius-users-bounces+drivard=datavalet@lists.freeradius.org]
On Behalf Of Fajar A. Nugraha
 Sent: November-22-12 4:56 PM
 To: FreeRadius users mailing list
 Subject: Re: Debian build the freeradius package with unixodbc support

On Fri, Nov 23, 2012 at 3:33 AM, Dominick Rivard driv...@datavalet.com
wrote:
  I also want to let you know that it has been replaced by 
 libiodbc2-dev but

 No, it hasn't.

 http://packages.debian.org/wheezy/unixodbc-dev
 http://packages.ubuntu.com/raring/unixodbc-dev

 iodbc is another different package.

They might be two different packages but they conflict in apt:
Apt-get upgrade  message -- The following packages will be REMOVED:
unixodbc-dev The following NEW packages will be installed: libiodbc2-dev

 then you have to
 create a symlink: ln -s /usr/lib/libodbc.so.1 /usr/lib/libodbc.so 
 because it isn't created when installing the package.


 unixodbc-dev has libodbc.so:
 http://packages.debian.org/wheezy/amd64/unixodbc-dev/filelist


 Now I have a freeradius and MSSQL backend working and being tested for 
 a future production move.

 I'm just wondering, why didn't you just use iodbc? That seems to be the
default in debian, and should work for mssql.

Probably the lack of documentation on how to get freeradius to work with
iodbc or even unixodbc is part of it and because I found a post that was
explaining a lot on how to get freeradius and mssql working together. 
http://it.reinhardt.edu/dave/radius-mssql-howto.html 

But I give it a try this morning installing freeradius-iodbc. I configured
my /etc/odbc.ini, /etc/freetds/freetds.conf and /etc/odbcinst.ini. 
These files configuration can be found here:
http://serverfault.com/questions/448365/debian-build-the-freeradius-package-
with-unixodbc-support/451350#451350 

rlm_sql (sql): Driver rlm_sql_iodbc (module rlm_sql_iodbc) loaded
and linked
rlm_sql (sql): Attempting to connect to db_user@MSSQLServer:/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_iodbc #0
sql_create_socket: SQLConnectfailed:  [iODBC][Driver Manager]Data
source name not found and no default driver specified. Driver could not be
loaded
rlm_sql (sql): Failed to connect DB handle #0

I tried to add these environment variables, since trying to find the fix for
that error seems to go through these variables, but still no luck at getting
freeradius with mssql using iodbc.

export ODBCINSTINI='/etc/odbcinst.ini'
export ODBCINI='/etc/odbc.ini'

Regards.
Dominick

--
Fajar
-
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: Debian build the freeradius package with unixodbc support

2012-11-22 Thread Dominick Rivard
Hi,

I finally got  everything compiling and work just fine.
You can see the answer I provided to my own question on serverfault.

http://serverfault.com/a/451350/99708

Thank you for the unixodbc-dev dependencies I was missing. 
 I also want to let you know that it has been replaced by libiodbc2-dev but
then you have to 
create a symlink: ln -s /usr/lib/libodbc.so.1 /usr/lib/libodbc.so because it
isn't created when installing the package.

Now I have a freeradius and MSSQL backend working and being tested for a
future production move.

Best.
Dominick


-Original Message-
From: freeradius-users-bounces+drivard=datavalet@lists.freeradius.org
[mailto:freeradius-users-bounces+drivard=datavalet@lists.freeradius.org]
On Behalf Of Fajar A. Nugraha
Sent: November-13-12 9:58 PM
To: FreeRadius users mailing list
Subject: Re: Debian build the freeradius package with unixodbc support

On Wed, Nov 14, 2012 at 4:22 AM, Dominick Rivard driv...@datavalet.com
wrote:
 Here is what I am trying to achieve, we want to install freeradius 
 using a Microsoft SQL backend. I read on the internet that we need to 
 achieve this goal using the unixodbc driver.

That's not the only way.

unixodbc and iodbc are (mostly) driver-compatible.


 This is actually working. But I found out downloading the freeradius 
 tarbal that it can't use the rlm_sql_unixodbc driver, because in the 
 debian/rules file they compile it using the flag:

 --without-rlm_sql_unixodbc


 Do you have any idea of what I am missing to compile it successfully?

Short version? Just run apt-get install freeradius-iodbc, and configure
iodbc for mysql.

Long version: there are ways you can change the debian recipe to get it to
build odbc module (i.e. one of the requirements is that you need to install
unixodbc-dev first), but it's MUCH easier to just use whatever the distro
provide and support. Debian and Ubuntu has 2.1.12 with backported security
patches, and 2.2.0 is available from my ppa:
https://launchpad.net/~freeradius/+archive/stable.

--
Fajar
-
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: Debian build the freeradius package with unixodbc support

2012-11-22 Thread Fajar A. Nugraha
On Fri, Nov 23, 2012 at 3:33 AM, Dominick Rivard driv...@datavalet.com wrote:
  I also want to let you know that it has been replaced by libiodbc2-dev but

No, it hasn't.

http://packages.debian.org/wheezy/unixodbc-dev
http://packages.ubuntu.com/raring/unixodbc-dev

iodbc is another different package.

 then you have to
 create a symlink: ln -s /usr/lib/libodbc.so.1 /usr/lib/libodbc.so because it
 isn't created when installing the package.


unixodbc-dev has libodbc.so:
http://packages.debian.org/wheezy/amd64/unixodbc-dev/filelist


 Now I have a freeradius and MSSQL backend working and being tested for a
 future production move.

I'm just wondering, why didn't you just use iodbc? That seems to be
the default in debian, and should work for mssql.

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


Re: Debian build the freeradius package with unixodbc support

2012-11-13 Thread Fajar A. Nugraha
On Wed, Nov 14, 2012 at 4:22 AM, Dominick Rivard driv...@datavalet.com wrote:
 Here is what I am trying to achieve, we want to install freeradius using a
 Microsoft SQL backend. I read on the internet that we need to achieve this
 goal using the unixodbc driver.

That's not the only way.

unixodbc and iodbc are (mostly) driver-compatible.


 This is actually working. But I found out downloading the freeradius tarbal
 that it can't use the rlm_sql_unixodbc driver, because in the debian/rules
 file they compile it using the flag:

 --without-rlm_sql_unixodbc


 Do you have any idea of what I am missing to compile it successfully?

Short version? Just run apt-get install freeradius-iodbc, and
configure iodbc for mysql.

Long version: there are ways you can change the debian recipe to get
it to build odbc module (i.e. one of the requirements is that you need
to install unixodbc-dev first), but it's MUCH easier to just use
whatever the distro provide and support. Debian and Ubuntu has 2.1.12
with backported security patches, and 2.2.0 is available from my ppa:
https://launchpad.net/~freeradius/+archive/stable.

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