Re: how to change the radiusd.conf file to fit mysql database?

2009-12-17 Thread Saeed Akhtar
hi.
In new version you will find it in sites-available/default file.

Regards,

Saeed Akhtar



On Thu, Dec 17, 2009 at 2:35 PM, Zhang Shukun bit...@gmail.com wrote:

 hi, friends

 i install freereadius 2.1.7. i follow the instruction as follow:
 radiusd.conf

 Find the “authorize” section (near the bottom) and add “sql” (no quotes)
 between “suffix” and “files”. Comment out “files” by putting a # in front of
 it. Do the same to “suffix”.

 Find the “accounting” section (a bit underneath the authorize section) and
 place the word “sql” (without quotes” between “unix” and radutmp”

 but i cant find the authorize or suffix key words in the radius.conf file.

 do you know where is it to set for mysql?

 Thanks!


 --
 Regards,
 Sucan

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

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

CHAP password using perl

2009-01-16 Thread Saeed Akhtar
Hi all,
   I wrote a code in perl to calculate remaining time using my own database.
for authentication I used User-Password attribute. but then I tested it with
real NAS server and I realized that I haven't catered CHAP password. Now I
want to ask that if there any module which convert CHAP password to
user-password feild or there is any way to integrate CHAP password module in
perl code. Means I want to authenticate CHAP password through my own perl
code, how will I do it.
  I'll be thankful for any help
Regards,

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

rlm_perl help required

2008-12-15 Thread Saeed Akhtar
Hi all,
   I want to use perl for authorize and accounting function in freeradius. I
have successfully configured perl. Now I have a little problem, I don't know
how to tell freeradius that reply with Access-Accept message. Because
rlm_module_ok tells that this module executed successfully. Now I want to
ask how will I tell freeradius that reply with Access-Accept. Because if I
just give a message in RAD_REPLY{'Reply-Message'} and then end my function
with return RLM_MODULE_OK, freeradius sends Access-Reject packet with my
Reply-Message. Can anybody please help me. Thanks

Regards,

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

rlm_perl

2008-12-05 Thread Saeed Akhtar
Hi all,

   I have problem in rlm_perl module I found a documentation which says
that rlm_perl is not in default modules of freeradius so you have to add a
value rlm_perl in src/modules/stable before configuring freeradius. I
added that. Now in wiki of freeradius, I read rlm_perl and do what ever he
says. But i got an error, as I never found DEFAULT Auth-Type = System.. so I
added my own entry of DEFAULT Auth-Type = Perl.

But now when I execute it, it gives following error:

/usr/local/etc/raddb/users[61]: parse error (check) for entry DEFAULT:
Unknown value Perl for attribute Auth-Type

Error reading /usr/local/etc/raddb/users

I just want to install rlm_perl and use it in accounting section, so that I
can count its packets in and out.and time usage of user and make my own
decisions.

Can anyone please help me, I'll be Thankful
Regards,

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

Re: Time based billing

2008-12-03 Thread Saeed Akhtar
Thank you all for your support. I think rlm_perl is better option because
queries are a bit complex and I want to integerate more functionality in
future. Thanks once again to all .

Regards,

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

Time based billing

2008-12-02 Thread Saeed Akhtar
Hi all,

   I want to ask that if there is some kind of flexibility in freeradius to
have time based billing. I want a customer to be charged at different rate
at different time. Like I want to introduce a package which has different
rate at morning eg. $1/hr from 0800 to 1200 then 0.5/hr from 1200 to 1800
then 0.25/hr from 1800 to 0800hrs. Now what should I do. I know that there
are sqlcounters but these are for flat rates.

   Now is there any flexibility to do so. And if not then is there any
plugable module available by which i could achieve this. I'll be thankful
for your help
Regards,

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

Re: Time based billing

2008-12-02 Thread Saeed Akhtar
Yes I know that freeradius doesn't know whether we are charging $ 1 or 2.
But the purpose of asking question was that If a user has 3 hrs left @ $1/hr
and after an hour the rate changes to 0.5/hr then technically freeradius
should reply Session-Timeout = 5hrs as (1hr @ $1/hr + 4hrs @ $0.5/hr). So
may be we can create some condition to do so.

Ivan Kalik suggested that I should go for perl. But frankly speaking I never
used perl so may be its too difficult for me to use perl code. I want to
know is there any other choice or I have to go for perl?
Regards,

Saeed Akhtar



On Tue, Dec 2, 2008 at 6:57 AM, mulianto [EMAIL PROTECTED] wrote:

  i Think freeradius doesn't know if you charge for 1$ or 2$, it just
 counting the time usage.

 it should be with your application task to do so..


 On Tue, 2008-12-02 at 21:47 +0500, Saeed Akhtar wrote:

 0.5/hr from 1200 t


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

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

Check on bytes used

2008-11-30 Thread Saeed Akhtar
Hi all,

I want to create a check on user monthly usage in (MB/GB etc.). Is there
any module available to do so. yes or not what attribute will be sent to
client, like session-timeout attribute gives the time in second.

   waiting for reply. thanks
Regards,

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

Re: Check on bytes used

2008-11-30 Thread Saeed Akhtar
Its for Time. I want count on bytes used. and one other problem, its return
value is Session-Timeout. It represents remaining time not remaining bytes.
any clue which attribute will tell remaining bytes???
Regards,

Saeed Akhtar



On Sun, Nov 30, 2008 at 8:59 PM, Venkatesh K [EMAIL PROTECTED] wrote:

 Check out http://wiki.freeradius.org/Rlm_sqlcounter

 Regards,

 Venkatesh. K



 On Sun, Nov 30, 2008 at 9:13 PM, Saeed Akhtar [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I want to create a check on user monthly usage in (MB/GB etc.). Is
 there
  any module available to do so. yes or not what attribute will be sent to
  client, like session-timeout attribute gives the time in second.
 
 waiting for reply. thanks
 
  Regards,
 
  Saeed Akhtar
 
 
  -
  List info/subscribe/unsubscribe? See
  http://www.freeradius.org/list/users.html
 
 -
 List info/subscribe/unsubscribe? See
 http://www.freeradius.org/list/users.html

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

help needed --- jradius configuration with freeradius 2.1.1

2008-11-29 Thread Saeed Akhtar
Hi,

I want to configure jradius with freeradius 2.1.1. I added jradius in
modules section of freeradius radiusd.conf file...  also added jradius in
authorize section. Now when I run send request to freeradius its trace is
like this:

rlm_jradius: Reserving JRadius socket id: 7
rlm_jradius: packing attribute User-Name (type: 1; len: 7)
rlm_jradius: packing attribute User-Password (type: 2; len: 5)
rlm_jradius: packing attribute NAS-IP-Address (type: 4; len: 4)
rlm_jradius: packing attribute Message-Authenticator (type: 80; len: 16)
rlm_jradius: packing packet with code: 1 (attr length: 80)
rlm_jradius: packing packet with code: 0 (attr length: 0)
rlm_jradius: sending 121 bytes to socket 7
rlm_jradius: error sending request with socket 7
rlm_jradius: Closing JRadius connection 7
rlm_jradius: reconnecting socket id 7
rlm_jradius: sending 121 bytes to socket 7
rlm_jradius: error sending request with socket 7
rlm_jradius: problem packing the data[socket_send/first_read]
rlm_jradius: Closing JRadius connection 7
rlm_jradius: Released JRadius socket id: 7
+++[jradius] returns noop

On the other side I got exception in jradius with is as:

java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:180)
at java.io.DataInputStream.readFully(DataInputStream.java:152)
at
net.sf.jradius.packet.PacketFactory.parsePacket(PacketFactory.java:136)
at net.sf.jradius.packet.PacketFactory.parse(PacketFactory.java:167)
at
net.sf.jradius.freeradius.FreeRadiusProcessor.parseRequest(FreeRadiusProcessor.java:76)
at
net.sf.jradius.freeradius.FreeRadiusProcessor.processRequest(FreeRadiusProcessor.java:55)
at net.sf.jradius.server.Processor.process(Processor.java:119)
at net.sf.jradius.server.Processor.run(Processor.java:91)
net.sf.jradius.freeradius.FreeRadiusProcessor(7): process() method threw an
exception: java.lang.NegativeArraySizeException
java.lang.NegativeArraySizeException
at
net.sf.jradius.freeradius.FreeRadiusProcessor.parseRequest(FreeRadiusProcessor.java:79)
at
net.sf.jradius.freeradius.FreeRadiusProcessor.processRequest(FreeRadiusProcessor.java:55)
at net.sf.jradius.server.Processor.process(Processor.java:119)
at net.sf.jradius.server.Processor.run(Processor.java:91)

Can anyone please help me where is the problem?? Thanks

Regards,

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

Re: help needed --- jradius configuration with freeradius 2.1.1

2008-11-29 Thread Saeed Akhtar
I figured it out. It was just conflict of version. Freeradius 2.11 is not
configurable with older version of jradius. it needs new version - jradius
1.0.0 server.
http://dev.coova.org/mvn/net/jradius/jradius-server/1.0.0/jradius-server-1.0.0-release.zip

Thanks to all.
Regards,

Saeed Akhtar



On Sat, Nov 29, 2008 at 4:05 PM, Saeed Akhtar [EMAIL PROTECTED]wrote:

 Hi,

 I want to configure jradius with freeradius 2.1.1. I added jradius in
 modules section of freeradius radiusd.conf file...  also added jradius in
 authorize section. Now when I run send request to freeradius its trace is
 like this:

 rlm_jradius: Reserving JRadius socket id: 7
 rlm_jradius: packing attribute User-Name (type: 1; len: 7)
 rlm_jradius: packing attribute User-Password (type: 2; len: 5)
 rlm_jradius: packing attribute NAS-IP-Address (type: 4; len: 4)
 rlm_jradius: packing attribute Message-Authenticator (type: 80; len: 16)
 rlm_jradius: packing packet with code: 1 (attr length: 80)
 rlm_jradius: packing packet with code: 0 (attr length: 0)
 rlm_jradius: sending 121 bytes to socket 7
 rlm_jradius: error sending request with socket 7
 rlm_jradius: Closing JRadius connection 7
 rlm_jradius: reconnecting socket id 7
 rlm_jradius: sending 121 bytes to socket 7
 rlm_jradius: error sending request with socket 7
 rlm_jradius: problem packing the data[socket_send/first_read]
 rlm_jradius: Closing JRadius connection 7
 rlm_jradius: Released JRadius socket id: 7
 +++[jradius] returns noop

 On the other side I got exception in jradius with is as:

 java.io.EOFException
 at java.io.DataInputStream.readFully(DataInputStream.java:180)
 at java.io.DataInputStream.readFully(DataInputStream.java:152)
 at
 net.sf.jradius.packet.PacketFactory.parsePacket(PacketFactory.java:136)
 at
 net.sf.jradius.packet.PacketFactory.parse(PacketFactory.java:167)
 at
 net.sf.jradius.freeradius.FreeRadiusProcessor.parseRequest(FreeRadiusProcessor.java:76)
 at
 net.sf.jradius.freeradius.FreeRadiusProcessor.processRequest(FreeRadiusProcessor.java:55)
 at net.sf.jradius.server.Processor.process(Processor.java:119)
 at net.sf.jradius.server.Processor.run(Processor.java:91)
 net.sf.jradius.freeradius.FreeRadiusProcessor(7): process() method threw an
 exception: java.lang.NegativeArraySizeException
 java.lang.NegativeArraySizeException
 at
 net.sf.jradius.freeradius.FreeRadiusProcessor.parseRequest(FreeRadiusProcessor.java:79)
 at
 net.sf.jradius.freeradius.FreeRadiusProcessor.processRequest(FreeRadiusProcessor.java:55)
 at net.sf.jradius.server.Processor.process(Processor.java:119)
 at net.sf.jradius.server.Processor.run(Processor.java:91)

 Can anyone please help me where is the problem?? Thanks

 Regards,

 Saeed Akhtar


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

Problem in using counters

2008-11-28 Thread Saeed Akhtar
Hi all,

  I have upgraded to Freeradius ver 2.1.1. I want to use counter (using sql)
so I added counter.conf in modules, nonresetcounter, dailycounter and
monthlycounter in authorize section in default. Also added an entry in
radcheck Username=123, attribute = Max-Daily-Session , op = := ,Value = 100.

  Now when I execute radius and send auth packet for user=123 it goes to
sql_rlm and ends up with following error:

rlm_sql: Failed to create the pair: Invalid octet string 100 for attribute
name Max-Daily-Session

rlm_sql (sql): Error getting data from database

[sql] SQL query error; rejecting user

And then it sends Accept-Reject reply

Can anyone tell me where is the problem???
Regards,

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

Re: Problem in using counters

2008-11-28 Thread Saeed Akhtar
I was using mysql. Thanks it worked.

Regards,

Saeed Akhtar



On Fri, Nov 28, 2008 at 7:57 PM, [EMAIL PROTECTED] wrote:

   I have upgraded to Freeradius ver 2.1.1. I want to use counter (using
 sql)
 so I added counter.conf

 sql counters are defined in raddb/sql/mysq(or whatever
 database)/counter.conf, not the one in modules. You should also add the
 counter to the instatiate section of radiusd.conf.

 Ivan Kalik
 Kalik Informatika ISP

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

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

Read radius client from database

2008-11-26 Thread Saeed Akhtar
Hi all,

   I am having problem to configure Radius to read client information from
mysql database table nas. I found an option at last line of sql.conf

readclients = yes

i uncommented it ... then added record in nas table... then tried to send
request from newly added client but it says unknown client Can anyone
help me in this regard??? Thank you
Regards,

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

Re: Read radius client from database

2008-11-26 Thread Saeed Akhtar
 = yes
 radutmp: perm = 384
 radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Listening on authentication *:1812
Listening on accounting *:1813
Ready to process requests.


Regards,

Saeed Akhtar



2008/11/26 [EMAIL PROTECTED]

 Post the debug of the server startup.

 Ivan Kalik
 Kalik Informatika ISP


 Dana 26/11/2008, Saeed Akhtar [EMAIL PROTECTED] piše:

 Hi all,
 
I am having problem to configure Radius to read client information from
 mysql database table nas. I found an option at last line of sql.conf
 
 readclients = yes
 
 i uncommented it ... then added record in nas table... then tried to send
 request from newly added client but it says unknown client Can anyone
 help me in this regard??? Thank you
 Regards,
 
 Saeed Akhtar
 
 

 -
 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: Read radius client from database

2008-11-26 Thread Saeed Akhtar
Thanks for ur help setting sql in authorize section of radiusd.conf
solved the problem But now when sql checks for username and password it
gives error Unknow Attribute Cleartext-Password.. I am not
upgrading to 2.x because i  tried to configure jradius with 2.1.1 it gave
errors... so best choice left for me was to degrade to 1.1.3 ... as a patch
was available for this version but now im facing problems regarding
mysql Can you people suggest me anything.. Thanks for the help
Regards,

Saeed Akhtar



On Wed, Nov 26, 2008 at 6:17 PM, Alan DeKok [EMAIL PROTECTED]wrote:

 Saeed Akhtar wrote:
  Debug Trace:

  You're not running 2.x.  You should upgrade.

  You haven't configured the SQL module.  You need to do this for it to
 work.

  Alan DeKok.
 -
 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: Read radius client from database

2008-11-26 Thread Saeed Akhtar
Thanks It worked but here comes another issue where im
stuck ... using both sql and jradius for authorization creates a problem
First freeradius goes to sql and check for the user record... regardless of
result of sql , request is also fwd to jradius. and jradius also checks for
the same username in another database over another server (as im using
jradius for having connectivity to another server)... i want freeradius to
not go to jradius if sql result is access-accept i dont now that is
there any conditional statements in configuration file which will help me
  hopeful for some help :)  Thanks
Regards,

Saeed Akhtar



2008/11/26 [EMAIL PROTECTED]

 1.1.3 doesn't use Cleartext-Password. That came in 1.1.4. Read the users
 file. It should be User-Password.

 Ivan Kalik
 Kalik Informatika ISP


 Dana 26/11/2008, Saeed Akhtar [EMAIL PROTECTED] piše:

 Thanks for ur help setting sql in authorize section of
 radiusd.conf
 solved the problem But now when sql checks for username and password
 it
 gives error Unknow Attribute Cleartext-Password.. I am not
 upgrading to 2.x because i  tried to configure jradius with 2.1.1 it gave
 errors... so best choice left for me was to degrade to 1.1.3 ... as a
 patch
 was available for this version but now im facing problems regarding
 mysql Can you people suggest me anything.. Thanks for the help
 Regards,
 
 Saeed Akhtar
 
 
 
 On Wed, Nov 26, 2008 at 6:17 PM, Alan DeKok [EMAIL PROTECTED]
 wrote:
 
  Saeed Akhtar wrote:
   Debug Trace:
 
   You're not running 2.x.  You should upgrade.
 
   You haven't configured the SQL module.  You need to do this for it to
  work.
 
   Alan DeKok.
  -
  List info/subscribe/unsubscribe? See
  http://www.freeradius.org/list/users.html
 
 
 

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

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

Problem in setting up radius database in sql

2008-11-20 Thread Saeed Akhtar
}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}',
'%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}',
'%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}',
'%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}',
'%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')
  group_membership_query = SELECT GroupName FROM usergroup WHERE
UserName='%{SQL-User-Name}'
  connect_failure_retry_delay = 60
  simul_count_query = 
  simul_verify_query = SELECT RadAcctId, AcctSessionId, UserName,
NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol
FROM radacct WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0
  postauth_query = INSERT into radpostauth (id, user, pass, reply, date)
values ('', '%{User-Name}', '%{User-Password:-Chap-Password}',
'%{reply:Packet-Type}', NOW())
  safe-characters =
@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /
  }
rlm_sql (sql): Could not link driver rlm_sql_mysql: rlm_sql_mysql.so: cannot
open shared object file: No such file or directory
rlm_sql (sql): Make sure it (and all its dependent libraries!) are in the
search path of your system's ld.
/usr/local/etc/raddb/sql.conf[14]: Instantiation failed for module sql
/usr/local/etc/raddb/radiusd.conf[1847]: Failed to find module sql.
/usr/local/etc/raddb/radiusd.conf[1776]: Errors parsing authorize section.
 }
}
Errors initializing modules

If somebody could help me i'll be very thankful.

Regards,

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

Re: Problem in setting up radius database in sql

2008-11-20 Thread Saeed Akhtar
I'm sorry but how to compile/install it using mysql extensions
rlm_sql_mysql... can u plz guide me.. i cant find any help on internet.
Regards,

Saeed Akhtar



On Thu, Nov 20, 2008 at 1:43 PM, Alexandre Chapellon 
[EMAIL PROTECTED] wrote:

 your freeradius seems to be compiled/installed without the mysql extensions
 rlm_sql_mysql
 -
 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: Problem in setting up radius database in sql

2008-11-20 Thread Saeed Akhtar
I am using ubuntu 7.04 ... btw link sent by Ivan really worked . thanks
to all.
Regards,

Saeed Akhtar



On Thu, Nov 20, 2008 at 5:58 PM, Saif Aadil [EMAIL PROTECTED] wrote:

  try 'yum install freeradius-mysql'

 --
 Date: Thu, 20 Nov 2008 13:15:42 +0500
 From: [EMAIL PROTECTED]
 To: freeradius-users@lists.freeradius.org
 Subject: Problem in setting up radius database in sql

 Hi all,
I want to setup radius database in mysql I browse through wiki and
 found an artical SQL How to http://wiki.freeradius.org/SQL_HOWTO  I
 went through step by step and when in the last i tried to run radiusd ... I
 ended up with following error:

  Module: Linked to module rlm_sql
  Module: Instantiating sql
   sql {
   driver = rlm_sql_mysql
   server = localhost
   port = 
   login = root
   password = 123
   radius_db = radius
   read_groups = yes
   sqltrace = yes
   sqltracefile = /usr/local/var/log/radius/sqltrace.sql
   readclients = no
   deletestalesessions = yes
   num_sql_socks = 5
   sql_user_name = %{User-Name}
   default_user_profile = 
   nas_query = SELECT id,nasname,shortname,type,secret FROM nas
   authorize_check_query = SELECT id, UserName, Attribute, Value, op FROM
 radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id
   authorize_reply_query = SELECT id, UserName, Attribute, Value, op FROM
 radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id
   authorize_group_check_query = SELECT 
 radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
 FROM radgroupcheck,usergroup WHERE usergroup.Username = '%{SQL-User-Name}'
 AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY
 radgroupcheck.id
   authorize_group_reply_query = SELECT 
 radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
 FROM radgroupreply,usergroup WHERE usergroup.Username = '%{SQL-User-Name}'
 AND usergroup.GroupName = radgroupreply.GroupName ORDER BY
 radgroupreply.id
   accounting_onoff_query = UPDATE radacct SET AcctStopTime='%S',
 AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime),
 AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay =
 '%{Acct-Delay-Time}' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND
 NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime = '%S'
   accounting_update_query = UPDATE radacct SET FramedIPAddress =
 '%{Framed-IP-Address}', AcctSessionTime = '%{Acct-Session-Time}',
 AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets =
 '%{Acct-Output-Octets}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND
 UserName = '%{SQL-User-Name}' AND NASIPAddress= '%{NAS-IP-Address}'
   accounting_update_query_alt = INSERT into radacct (AcctSessionId,
 AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
 AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
 AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
 ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay)
 values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
 '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
 '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
 %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}',
 '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}',
 '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}',
 '%{Framed-IP-Address}', '0')
   accounting_start_query = INSERT into radacct (AcctSessionId,
 AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
 AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
 ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
 CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
 FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay)
 values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
 '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
 '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}',
 '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '',
 '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',
 '%{Acct-Delay-Time}', '0')
   accounting_start_query_alt = UPDATE radacct SET AcctStartTime = '%S',
 AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}'
 WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}'
 AND NASIPAddress = '%{NAS-IP-Address}'
   accounting_stop_query = UPDATE radacct SET AcctStopTime = '%S',
 AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets =
 '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}',
 AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay =
 '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE
 AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND
 NASIPAddress = '%{NAS-IP-Address}'
   accounting_stop_query_alt = INSERT

Re: Re: Problem in setting up radius database in sql

2008-11-20 Thread Saeed Akhtar
I agree but in my case it was because a package mysql-dev was missing...
when i installed it. everthing went good.
Regards,

Saeed Akhtar



2008/11/20 dgluoyun [EMAIL PROTECTED]

 I install the freeradius and mysql with the rpm packages, in the
 default way. nothing special to mention.


 在2008-11-20,Saeed Akhtar [EMAIL PROTECTED] 写道:

 I'm sorry but how to compile/install it using mysql extensions
 rlm_sql_mysql... can u plz guide me.. i cant find any help on internet.
 Regards,

 Saeed Akhtar



 On Thu, Nov 20, 2008 at 1:43 PM, Alexandre Chapellon 
 [EMAIL PROTECTED] wrote:

 your freeradius seems to be compiled/installed without the mysql
 extensions rlm_sql_mysql
 -
 List info/subscribe/unsubscribe? See
 http://www.freeradius.org/list/users.html




 --
 [广告] 金秋最关注楼盘-房不胜房 http://popme.163.com/link/003985_1010_7027.html
 -
 List info/subscribe/unsubscribe? See
 http://www.freeradius.org/list/users.html

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

Help needed --- urgent

2008-11-19 Thread Saeed Akhtar
Hi all,

   I'm new to freeradius and i want to configure and test my server... I
have installed server from cvs  now when i run radiusd -X its output is
like this:

FreeRADIUS Version 2.0.6, for host i686-pc-linux-gnu, built on Nov 19 2008
at 17:00:09
Copyright (C) 1999-2008 The FreeRADIUS server project and contributors.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License v2.
Starting - reading configuration files ...
including configuration file /usr/local/etc/raddb/radiusd.conf
including configuration file /usr/local/etc/raddb/proxy.conf
including configuration file /usr/local/etc/raddb/clients.conf
including configuration file /usr/local/etc/raddb/snmp.conf
including configuration file /usr/local/etc/raddb/jradius.conf
including configuration file /usr/local/etc/raddb/eap.conf
including configuration file /usr/local/etc/raddb/sql.conf
including dictionary file /usr/local/etc/raddb/dictionary
main {
  prefix = /usr/local
  localstatedir = /usr/local/var
  logdir = /usr/local/var/log/radius
  libdir = /usr/local/lib
  radacctdir = /usr/local/var/log/radius/radacct
  hostname_lookups = no

.

.

.

.

 Module: Linked to module rlm_realm
 Module: Instantiating suffix
  realm suffix {
  format = suffix
  delimiter = @
  ignore_default = no
  ignore_null = no
  }
 Module: Linked to module rlm_files
 Module: Instantiating files
  files {
  usersfile = /usr/local/etc/raddb/users
  acctusersfile = /usr/local/etc/raddb/acct_users
  preproxy_usersfile = /usr/local/etc/raddb/preproxy_users
  compat = no
  }
/usr/local/etc/raddb/jradius.conf[2]: Invalid version in module
'rlm_jradius'
/usr/local/etc/raddb/radiusd.conf[1868]: Failed to find module jradius.
/usr/local/etc/raddb/radiusd.conf[1776]: Errors parsing authorize section.
 }
}
Errors initializing modules

Can anyone please help me... why im getting error ... how can i fix this.

Regards,

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

Re: Help needed --- urgent

2008-11-19 Thread Saeed Akhtar
Thanks Ivan... I was not using jradius... and now it  works thanks alot
Regards,

Saeed Akhtar


On Wed, Nov 19, 2008 at 6:35 PM, [EMAIL PROTECTED] wrote:

I'm new to freeradius and i want to configure and test my server... I
 have installed server from cvs  now when i run radiusd -X its output
 is
 like this:
 
 FreeRADIUS Version 2.0.6, for host i686-pc-linux-gnu, built on Nov 19 2008
 at 17:00:09
 Copyright (C) 1999-2008 The FreeRADIUS server project and contributors.
 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
 PARTICULAR PURPOSE.
 You may redistribute copies of FreeRADIUS under the terms of the
 GNU General Public License v2.
 Starting - reading configuration files ...
 including configuration file /usr/local/etc/raddb/radiusd.conf
 including configuration file /usr/local/etc/raddb/proxy.conf
 including configuration file /usr/local/etc/raddb/clients.conf
 including configuration file /usr/local/etc/raddb/snmp.conf
 including configuration file /usr/local/etc/raddb/jradius.conf
 including configuration file /usr/local/etc/raddb/eap.conf
 including configuration file /usr/local/etc/raddb/sql.conf
 including dictionary file /usr/local/etc/raddb/dictionary

 That looks very wrong - no mention of modules or virtual servers.

 /usr/local/etc/raddb/jradius.conf[2]: Invalid version in module
 'rlm_jradius'
 /usr/local/etc/raddb/radiusd.conf[1868]: Failed to find module jradius.
 /usr/local/etc/raddb/radiusd.conf[1776]: Errors parsing authorize section.
  }
 }
 Errors initializing modules
 
 Can anyone please help me... why im getting error ... how can i fix this.
 

 If you don't use jradius delete jradius.conf and $include in
 radiusd.conf.

 You should really get the stable version from git.

 Ivan Kalik
 Kalik Informatika ISP

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

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