Re: RE : FreeRadius + Freetds + unixodbc

2007-04-27 Thread tnt
Yes. This looks wrong:

[EMAIL PROTECTED]:/radius

Fix it in mssql.conf

Ivan Kalik
Kalik Informatika ISP


Dana 27/4/2007, "satish patel" <[EMAIL PROTECTED]> piše:

>Freeradius + mssql   more help project  :- http://linux.tulipit.com
>
>RPM installation
>
>[EMAIL PROTECTED] ha.d]# rpm -qa | grep freetds
>freetds-0.62.1-1
>freetds-devel-0.62.1-1
>freetds-unixodbc-0.62.1-1
>
>
>[EMAIL PROTECTED] ha.d]# rpm -qa | grep unixODBC
>freeradius-unixODBC-1.0.1-2.RHEL4
>unixODBC-kde-2.2.9-1
>unixODBC-devel-2.2.9-1
>unixODBC-2.2.9-1
>
>
>Software:
>Using FreeRADIUS with MSSQL requires three components:
>
>* FreeRADIUS - the radius server software
>* FreeTDS - this is a set of libraries that know how to "talk" to a MSSQL 
> server.
>* unixODBC - this is a conduit between FreeRADIUS and FreeTDS.
>
>At one time, I think FreeRADIUS supported FreeTDS directly, but for some 
>reason the FreeRADIUS folks removed that capability in recent versions. So we 
>have to use unixODBC now. No biggie really. It's still pretty simple.
>
>I used the following versions on my box:
>
>* FreeRADIUS 1.1.0
>* FreeTDS 0.63
>* unixODBC 2.2.11
>
>If your distro has these as RPMs, debs, etc, you might be able to get it going 
>with what the distro provides. If so, you can skip the install instructions 
>and focus on the configuration (but do be careful as your files won't likely 
>be in the same place that my files are). However, since I may want to use 
>eDirectory later, and since there is a special configure switch for FreeRADIUS 
>to turn on eDirectory support, I'm starting from scratch with all of them.
>
>Compiling and installing:
>
>untar freeradius-1.1.4.tar.gz
>and compilation option is
>
> ./configure --localstatedir=/var --sysconfdir=/etc
>  make
>  make install
>
>
>
>The general order to compile these three components is:
>
>   1. unixODBC
>   2. FreeTDS
>   3. FreeRADIUS
>
>
>Part I - compiling/installing unixODBC and FreeTDS
>unixODBC:
>pretty straightforward. Just do a standard
>
>./configure
>make
>make install
>
>However, if your Linux box doesn't have X Windows (mine doesn't), do a
>
>./configure --enable-gui=no
>
>so that it won't try to compile any GUI components.
>
>The only components of unixODBC that you have to deal with are the 
>configuration file odbc.ini and the isql "testing" program. The install 
>routine puts odbc.ini in /usr/local/etc, and puts isql in /usr/local/bin/ . 
>You can't really tweak the ini file until after you've installed FreeTDS, so 
>we'll skip that part for now.
>
>What you need from unixODBC: you need the odbc.ini file in /usr/local/etc and 
>the isql program in /usr/local/bin.
>
>FreeTDS:
>again, pretty straightforward.
>
>./configure
>make
>make install
>
>I didn't need any options for ./configure. I think at one time you had to tell 
>it where unixODBC was, but versions since ~0.62 can find it by themselves 
>(which is why you have to compile/install unixODBC first... )
>
>what you need from FreeTDS: the freetds.conf file in /usr/local/etc, the 
>libtdsodbc.so file in /usr/local/lib, and the tsql testing program in 
>/usr/local/bin
>
>After you've got unixODBC and freeTDS installed, you almost ready to start 
>configuring files and testing your database connectivity.
>
>Initial Test of FreeTDS:
>
>Before you jump into the configuring part, do a quick test to make sure your 
>box can actually connect to your SQL server and that FreeTDS compiled and 
>installed cleanly. (Note that at this point, we aren't really using the 
>unixODBC stuff yet). Use the tsql program to do this. My SQL server name is 
>blackboard, and I'll use a SQL username of "tester" and a password of 
>"letmein" to get in.
>
>tsql -H blackboard -p 1433 -U tester -P letmein
>
>If it works, you should see this:
>
>locale is "en_US"
>locale charset is "ISO-8859-1"
>1>
>
>If you see that, you know that you can at least talk to your SQL server. That 
>is a Good Thing (tm). If the test fails, try using the IP instead of the 
>hostname (or edit your resolv.conf/update your DNS records/etc). If it still 
>fails, make sure you've, umm, you know, really GOT a SQL user on your database 
>server named "tester". If it still still fails, you've got mondo problems that 
>I won't get into here...
>
>BTW - type "quit" to end the connection to the sql server.
>
>
>Configuration file example:-
>
>___/etc/odbc.ini
>
>[EMAIL PROTECTED] etc]# cat odbc.ini
>[ODBC Data Sources]
>FILEMANAGER = Radius on Blackboard
>
>[FILEMANAGER]
>Driver = /usr/lib/libtdsodbc.so
>Description = Radius on Blackboard
>Trace = No
>Servername = FILEMANAGER
>Database = radius
>
>[Default]
>Driver = /usr/lib/libtdsodbc.so
>
>
>___/etc/freetds.conf
>
>[EMAIL PROTECTED] etc]# cat freetds.conf
>[global]
>tds version = 8.0
>initial block size = 512
>text size = 64512
>
>[FILEMANAGER]
>host = filemanager
>port = 

Re: RE : FreeRadius + Freetds + unixodbc

2007-04-27 Thread satish patel
Freeradius + mssql   more help project  :- http://linux.tulipit.com

RPM installation 

[EMAIL PROTECTED] ha.d]# rpm -qa | grep freetds
freetds-0.62.1-1
freetds-devel-0.62.1-1
freetds-unixodbc-0.62.1-1


[EMAIL PROTECTED] ha.d]# rpm -qa | grep unixODBC
freeradius-unixODBC-1.0.1-2.RHEL4
unixODBC-kde-2.2.9-1
unixODBC-devel-2.2.9-1
unixODBC-2.2.9-1


Software:
Using FreeRADIUS with MSSQL requires three components:

* FreeRADIUS - the radius server software
* FreeTDS - this is a set of libraries that know how to "talk" to a MSSQL 
server.
* unixODBC - this is a conduit between FreeRADIUS and FreeTDS.

At one time, I think FreeRADIUS supported FreeTDS directly, but for some reason 
the FreeRADIUS folks removed that capability in recent versions. So we have to 
use unixODBC now. No biggie really. It's still pretty simple.

I used the following versions on my box:

* FreeRADIUS 1.1.0
* FreeTDS 0.63
* unixODBC 2.2.11

If your distro has these as RPMs, debs, etc, you might be able to get it going 
with what the distro provides. If so, you can skip the install instructions and 
focus on the configuration (but do be careful as your files won't likely be in 
the same place that my files are). However, since I may want to use eDirectory 
later, and since there is a special configure switch for FreeRADIUS to turn on 
eDirectory support, I'm starting from scratch with all of them.

Compiling and installing:

untar freeradius-1.1.4.tar.gz
and compilation option is 

 ./configure --localstatedir=/var --sysconfdir=/etc
  make
  make install



The general order to compile these three components is:

   1. unixODBC
   2. FreeTDS
   3. FreeRADIUS


Part I - compiling/installing unixODBC and FreeTDS
unixODBC:
pretty straightforward. Just do a standard

./configure
make
make install 

However, if your Linux box doesn't have X Windows (mine doesn't), do a

./configure --enable-gui=no 

so that it won't try to compile any GUI components.

The only components of unixODBC that you have to deal with are the 
configuration file odbc.ini and the isql "testing" program. The install routine 
puts odbc.ini in /usr/local/etc, and puts isql in /usr/local/bin/ . You can't 
really tweak the ini file until after you've installed FreeTDS, so we'll skip 
that part for now.

What you need from unixODBC: you need the odbc.ini file in /usr/local/etc and 
the isql program in /usr/local/bin.

FreeTDS:
again, pretty straightforward.

./configure
make
make install 

I didn't need any options for ./configure. I think at one time you had to tell 
it where unixODBC was, but versions since ~0.62 can find it by themselves 
(which is why you have to compile/install unixODBC first... )

what you need from FreeTDS: the freetds.conf file in /usr/local/etc, the 
libtdsodbc.so file in /usr/local/lib, and the tsql testing program in 
/usr/local/bin

After you've got unixODBC and freeTDS installed, you almost ready to start 
configuring files and testing your database connectivity.

Initial Test of FreeTDS:

Before you jump into the configuring part, do a quick test to make sure your 
box can actually connect to your SQL server and that FreeTDS compiled and 
installed cleanly. (Note that at this point, we aren't really using the 
unixODBC stuff yet). Use the tsql program to do this. My SQL server name is 
blackboard, and I'll use a SQL username of "tester" and a password of "letmein" 
to get in.

tsql -H blackboard -p 1433 -U tester -P letmein 

If it works, you should see this:

locale is "en_US"
locale charset is "ISO-8859-1"
1> 

If you see that, you know that you can at least talk to your SQL server. That 
is a Good Thing (tm). If the test fails, try using the IP instead of the 
hostname (or edit your resolv.conf/update your DNS records/etc). If it still 
fails, make sure you've, umm, you know, really GOT a SQL user on your database 
server named "tester". If it still still fails, you've got mondo problems that 
I won't get into here...

BTW - type "quit" to end the connection to the sql server. 


Configuration file example:-

___/etc/odbc.ini

[EMAIL PROTECTED] etc]# cat odbc.ini
[ODBC Data Sources]
FILEMANAGER = Radius on Blackboard

[FILEMANAGER]
Driver = /usr/lib/libtdsodbc.so
Description = Radius on Blackboard
Trace = No
Servername = FILEMANAGER
Database = radius

[Default]
Driver = /usr/lib/libtdsodbc.so


___/etc/freetds.conf

[EMAIL PROTECTED] etc]# cat freetds.conf
[global]
tds version = 8.0
initial block size = 512
text size = 64512

[FILEMANAGER]
host = filemanager
port = 1433
tds version = 8.0
dump file = /tmp/freetds.log
dump file append = yes

__/etc/odbcinst.ini___

[EMAIL PROTECTED] etc]# cat odbcinst.ini
[ODBC]
Trace   = Yes
TraceFile   = /tmp/sql.log
ForceTrace  = Yes
Pooling   

RE: RE : FreeRadius + Freetds + unixodbc

2007-04-18 Thread Santiago Balaguer García

  


  so by starting radiusd -X i have this error:rlm_sql (sql): Driver rlm_sql_unixodbc (module rlm_sql_unixodbc) loaded and linkedrlm_sql (sql): Attempting to connect to [EMAIL PROTECTED]:/radiusrlm_sql (sql): starting 0rlm_sql (sql): Attempting to connect rlm_sql_unixodbc #0rlm_sql_unixodbc: SQL down 08S01 [unixODBC][FreeTDS][SQL Server]Server is unavailable or does not exist. rlm_sql_unixodbc: Connection failed rlm_sql (sql): Failed to connect DB handle #0rlm_sql (sql): starting 1rlm_sql (sql): starting 2rlm_sql (sql): starting 3rlm_sql (sql): starting 4rlm_sql (sql): Failed to connect to any SQL server


  As you can figure out you have an connection error to your MS SQL DB. It is not a specificaly radius problem, it is only a misconfiurate db connection.
 First of all, try to connect with the db with the isql   progam.
 
 Previously there is an aricle in this list about this:
    http://lists.cistron.nl/pipermail/freeradius-users/2005-October/047463.html 
 
 Busca a la vez en Internet, en directorios, en enciclopedias...  Atrévete con el nuevo MSN Search 

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