Hello Lakmin -
On Wed, 15 Dec 1999, S.K.D. Lakmin Premnath wrote:
>
> Sorry for previous mail in HTML format because of my eudora mail client. I
> have attached this in text file.
> pls read and help me. to connect solaris to MSSQL server.
It looks to me like either the DBI module or FreeTDS (or both) is not installed
correctly. You should follow the installation instructions for each one, but
usually you would do the following:
perl Makefile.PL
make
make test
make install (as root)
For the "make test" for FreeTDS, you must first edit the file t/TestCommon.pl to
match your setup before the tests will succeed.
Also, your configuration file has a problem due to your use of both a Handler
and a Realm. You should change it like this:
# configuration file for sri.lanka.net
Foreground
LogStdout
LogDir /var/log/radius
DbDir /usr/local/etc/raddb
Trace 4
# You will probably want to change this to suit your site.
<Client radiator.lanka.net>
Secret annex
IgnoreAcctSignature
</Client>
<Client DEFAULT>
Secret mysecret
DupInterval 0
</Client>
<Handler Realm=relsql>
RejectHasReason
RewriteUsername s/^([^@]+).*/$1/
<AuthBy SQL>
DBSource dbi:FreeTDS:database=icarddb;host=matri.lanka.net;port=1433
DBUsername menik21
DBAuth menik21
# auth start from here
AuthSelect select PASSWORD from SUBSCRIBERS where USERNAME='%n'
# AuthSelect select PASSWORD, CHECKATTR, REPLYATTR from SUBSCRIBERS
where USERNAME='%n'
# You may want to tailor these for your ACCOUNTING table
AccountingTable ACCOUNTING
AcctColumnDef USERNAME,User-Name
AcctColumnDef TIME_STAMP,Timestamp,integer
AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type
AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
AcctColumnDef ACCTSESSIONID,Acct-Session-Id
AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
AcctColumnDef ACCTTERMINATECAUSE,Acct-Terminate-Cause
AcctColumnDef NASIDENTIFIER,NAS-Identifier
AcctColumnDef NASPORT,NAS-Port,integer
AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
FailureBackoffTime 30
</AuthBy>
# Log accounting to the detail file in LogDir
AcctLogFileName %L/relsql
</Handler>
# This will authenticate users from SUBSCRIBERS
<Handler>
<AuthBy SQL>
# Adjust DBSource, DBUsername, DBAuth to suit your DB
# DBSource dbi:mysql:radius
DBSource dbi:FreeTDS:database=icarddb;host=matri.lanka.net;port=1433
DBUsername menik21
DBAuth menik21
AuthSelect select PASSWORD from SUBSCRIBERS where USERNAME='%n'
# AuthSelect select PASSWORD, CHECKATTR, REPLYATTR from SUBSCRIBERS
where USERNAME='%n'
# You may want to tailor these for your ACCOUNTING table
AccountingTable ACCOUNTING
AcctColumnDef USERNAME,User-Name
AcctColumnDef TIME_STAMP,Timestamp,integer
AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type
AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
AcctColumnDef ACCTSESSIONID,Acct-Session-Id
AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
AcctColumnDef ACCTTERMINATECAUSE,Acct-Terminate-Cause
AcctColumnDef NASIDENTIFIER,NAS-Identifier
AcctColumnDef NASPORT,NAS-Port,integer
AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
</AuthBy>
<AuthBy FILE>
# Filename %D/users
</AuthBy>
# Log accounting to the detail file in LogDir
AcctLogFileName %L/detail-%m
</Handler>
<Log FILE>
# You can use special formatting characters
Filename %L/mylog
# Trace level to use (allows same values as the global Trace level)
Trace 4
</Log>
Your trace file shows that the accounting is being acknowledged by the AuthBy
FILE above, not the AuthBy SQL. Therefore your connection to the SQL database
is not working at all, so this needs to be fixed first as described above.
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.