RE: Debian build the freeradius package with unixodbc support
> -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 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
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 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
Debian build the freeradius package with unixodbc support
Hi, 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. I am able to set up the unixodbc driver from apt-get and if I configure Freetds to use it. After the installation and configs I can run the test command: isql -v DVSQLServer USERNAME PASSWORD +---+ | Connected! | | sql-statement | help [tablename] | quit | +---+ 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 I thought it would be easy to remove the flag from debian/rules and just build my own package using the command line: fakeroot dpkg-buildpackage -b -uc But it is failing with error: checking for SQLConnect in -lodbc... no checking for sql.h... yes configure: error: set --without-rlm_sql_unixodbc to disable it explicitly. configure: error: ./configure failed for ./drivers/rlm_sql_unixodbc configure: error: ./configure failed for src/modules/rlm_sql make: *** [config.status] Error 1 dpkg-buildpackage: error: debian/rules build gave error exit status 2 Do you have any idea of what I am missing to compile it successfully? I can also tell you that I ran these apt-get command to make sure I was having all the dependencies. apt-get build-dep -y unixodbc freetds-bin freetds-common freetds-dev tdsodbc freeradius apt-get install -y unixodbc freetds-bin freetds-common freetds-dev tdsodbc libssl-dev dpkg-dev Regards Dominick Dominick Rivard, Solutions Architect 5275 Queen Mary Montréal, Qc H3W 1Y3 Tel: 514-385-4448 ext 126 Fax: 514-385-6660 Notice: This message is confidential and privileged. If you are not the addressee, please inform the sender by return e-mail immediately and delete this message and destroy all copies. Avis : Ce message est confidentiel et protégé par le secret professionnel. Si vous nêtes pas le destinataire, veuillez informer lexpéditeur par courrier électronique immédiatement et effacer ce message et en détruire toute copie. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html