How Getting accounting informations ?
Vincent MARGUERIE
vi.marguerie at wanadoo.fr
Tue Mar 28 02:29:55 CEST 2006
Hi,
I've always got the same problem with accounting informations...sorry to
query you one more time !!
But I've made a new test with radclient and I have this log (maybe it
will be helpfull)
> echo "User-Password = tata, User-Name = tata, Accounting-Status-Type
= Start" | radclient -x -d /usr/local/etc/raddb/ radius:1813 acct whatever
rad_recv: Accounting-Request packet from host 192.168.0.1:32768, id=218,
length=44
User-Password = "\256\032\246\027\310$!\305\313UBc\306."
User-Name = "tata"
Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 7
modcall[preacct]: module "preprocess" returns noop for request 7
rlm_realm: No '@' in User-Name = "tata", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[preacct]: module "suffix" returns noop for request 7
modcall: leaving group preacct (returns noop) for request 7
Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 7
radius_xlat:
'/usr/local/var/log/radius/radacct/192.168.0.1/detail-20060328'
rlm_detail:
/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
expands to /usr/local/var/log/radius/radacct/192.168.0.1/detail-20060328
modcall[accounting]: module "detail" returns ok for request 7
rlm_unix: no Accounting-Status-Type attribute in request.
modcall[accounting]: module "unix" returns noop for request 7
rlm_radutmp: No Accounting-Status-Type record.
modcall[accounting]: module "radutmp" returns noop for request 7
radius_xlat: '*packet has no accounting status type*. [user 'tata', nas
'192.168.0.1']'
rlm_sql (sql) in sql_accounting: packet has no accounting status type.
[user 'tata', nas '192.168.0.1']
modcall[accounting]: module "sql" returns invalid for request 7
modcall: leaving group accounting (returns invalid) for request 7
Finished request 7
Going to the next request
--- Walking the entire request list ---
Cleaning up request 7 ID 218 with timestamp 44289161
Nothing to do. Sleeping until we see a request.
What does "*packet has no accounting status type*" means ? Is it the
reason for accounting doesn't work ?
I fell lost...please help :-)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For the auth section....there's no problem (see the following lines)
> echo "User-Password = tata, User-Name = tata, Accounting-Status-Type
= Start" | radclient -x -d /usr/local/etc/raddb/ radius:1812 auth whatever
rad_recv: Access-Request packet from host 192.168.0.1:32768, id=215,
length=44
User-Password = "tata"
User-Name = "tata"
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 4
modcall[authorize]: module "preprocess" returns ok for request 4
radius_xlat:
'/usr/local/var/log/radius/radacct/192.168.0.1/auth-detail-20060328'
rlm_detail:
/usr/local/var/log/radius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d
expands to
/usr/local/var/log/radius/radacct/192.168.0.1/auth-detail-20060328
modcall[authorize]: module "auth_log" returns ok for request 4
modcall[authorize]: module "chap" returns noop for request 4
modcall[authorize]: module "mschap" returns noop for request 4
rlm_realm: No '@' in User-Name = "tata", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 4
rlm_eap: No EAP-Message, not doing EAP
modcall[authorize]: module "eap" returns noop for request 4
users: Matched entry DEFAULT at line 152
modcall[authorize]: module "files" returns ok for request 4
radius_xlat: 'tata'
rlm_sql (sql): sql_set_user escaped user --> 'tata'
radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM
radcheck WHERE Username = 'tata' ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 1
rlm_sql_mysql: query: SELECT id, UserName, Attribute, Value,
op FROM radcheck WHERE Username = 'tata'
ORDER BY id
radius_xlat: 'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
FROM radgroupcheck,usergroup WHERE usergroup.Username = 'tata' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
rlm_sql_mysql: query: SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
FROM radgroupcheck,usergroup WHERE usergroup.Username = 'tata' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM
radreply WHERE Username = 'tata' ORDER BY id'
rlm_sql_mysql: query: SELECT id, UserName, Attribute, Value,
op FROM radreply WHERE Username = 'tata'
ORDER BY id
radius_xlat: 'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
FROM radgroupreply,usergroup WHERE usergroup.Username = 'tata' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql_mysql: query: SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
FROM radgroupreply,usergroup WHERE usergroup.Username = 'tata' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
rlm_sql (sql): Released sql socket id: 1
modcall[authorize]: module "sql" returns ok for request 4
modcall: leaving group authorize (returns ok) for request 4
auth: type Local
auth: user supplied User-Password matches local User-Password
Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 4
radius_xlat:
'/usr/local/var/log/radius/radacct/192.168.0.1/reply-detail-20060328'
rlm_detail:
/usr/local/var/log/radius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d
expands to
/usr/local/var/log/radius/radacct/192.168.0.1/reply-detail-20060328
modcall[post-auth]: module "reply_log" returns ok for request 4
rlm_sql (sql): Processing sql_postauth
radius_xlat: 'tata'
rlm_sql (sql): sql_set_user escaped user --> 'tata'
radius_xlat: 'INSERT into radpostauth (id, user, pass, reply, date)
values ('', 'tata', 'tata', 'Access-Accept', NOW())'
radius_xlat: '/usr/local/var/log/radius/sqltrace.sql'
rlm_sql (sql) in sql_postauth: query is INSERT into radpostauth (id,
user, pass, reply, date) values ('', 'tata', 'tata', 'Access-Accept', NOW())
rlm_sql (sql): Reserving sql socket id: 0
rlm_sql_mysql: query: INSERT into radpostauth (id, user, pass, reply,
date) values ('', 'tata', 'tata', 'Access-Accept', NOW())
rlm_sql (sql): Released sql socket id: 0
modcall[post-auth]: module "sql" returns ok for request 4
rlm_sql_log (sql_log): Processing sql_log_postauth
radius_xlat: 'INSERT INTO radpostauth ?? (user, pass,
reply, date) VALUES ?? ('tata',
'tata', ?? 'Access-Accept', '2006-03-28 03:22:25');'
radius_xlat: '/usr/local/var/log/radius/radacct/sql-relay'
modcall[post-auth]: module "sql_log" returns ok for request 4
modcall: leaving group post-auth (returns ok) for request 4
Sending Access-Accept of id 215 to 192.168.0.1 port 32768
Finished request 4
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 4 ID 215 with timestamp 44288fd1
Nothing to do. Sleeping until we see a request.
Regards,
Vincent
More information about the Freeradius-Users
mailing list