Many SQL accounts

2004-07-17 Thread Nikolay L. Kirillov



Hi All!
 
In this good sunday I'm trying to start accounting.
And have some trouble with freeradius 0.9.3:
In 'radiusd.conf' added lines
modules {
    # some other lines
$INCLUDE  ${confdir}/sql.conf # Instance named 
'sql'.$INCLUDE  ${confdir}/sql1.conf # Instance named 
'sql1'.$INCLUDE  ${confdir}/sql2.conf # Instance named 'sql2'.# 
some other lines
}
accounting {
    
acct_unique    
detail    Acct-Type KFirst 
{    
sql    }
 
    Acct-Type IPAddr  
{    
sql1    }
# If no matching
   sql2
}
 
In file 'acct_users' I have:
DEFAULT Realm == "Kfirst.com", Acct-Type := "KFirst"DEFAULT 
Client-IP-Address == "192.168.0.1", Acct-Type := "IPAddr"
When try to start radiusd I'v got error:
**Some debug cuted
rlm_sql (sql): Connected new DB handle, #1rlm_sql (sql): starting 
2rlm_sql (sql): Attempting to connect rlm_sql_mysql #2rlm_sql_mysql: 
Starting connect to MySQL server for #2rlm_sql (sql): Connected new DB 
handle, #2Module: Instantiated sql (sql)radiusd.conf[1] Failed to link 
to module 'rlm_sql1': rlm_sql1.so: cannot open shared object file: No such file 
or directory
 
I was made: ln -s /usr/local/lib/rlm_sql.so /usr/local/lib/rlm_sql1.so 

And got: 
*Some debug cuted
rlm_sql (sql): Connected new DB handle, #2Module: Instantiated sql 
(sql)radiusd.conf[1] Failed linking to rlm_sql1 structure in radiusd.conf: 
/usr/local/lib/rlm_sql-0.9.3.so: undefined symbol: rlm_sql1
Question: What's I do wrong?
 
Sorry for my English :)
 
Sincerely,
    Nikolay L. Kirillov
 


Re: Many SQL accounts

2004-07-18 Thread Alexander M. Pravking
On Sun, Jul 18, 2004 at 12:53:44PM +0800, Nikolay L. Kirillov wrote:
> Hi All!
> 
> In this good sunday I'm trying to start accounting.
> And have some trouble with freeradius 0.9.3:
> In 'radiusd.conf' added lines
> modules {
> # some other lines
> $INCLUDE  ${confdir}/sql.conf # Instance named 'sql'.
> $INCLUDE  ${confdir}/sql1.conf # Instance named 'sql1'.
> $INCLUDE  ${confdir}/sql2.conf # Instance named 'sql2'.

What's there? Looks like you have declared
sql1 {
...
}

The right syntax for module config is
module-name [ instance-name ] {
...
}

If not specified, instance name is the same as module name.

So that in you case:
sql sql1 {
...
}

> radiusd.conf[1] Failed to link to module 'rlm_sql1': rlm_sql1.so: cannot open shared 
> object file: No such file or directory
> 
> I was made: ln -s /usr/local/lib/rlm_sql.so /usr/local/lib/rlm_sql1.so 

It's an unnecessary dirty hack :)


-- 
Fduch M. Pravking

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