Lo all,
Below is a full debug output of a authentication request. I am trying to get rlm_sqlcounter to work - from what I can see, all the attributes are in place, but the module simply ignores them?? I'd appreciate some assistance, it must be something silly(tm) again...
--- Walking the entire request list ---
Cleaning up request 0 ID 138 with timestamp 417e7aa9
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host x.x.x.x:1029, id=55, length=250
Service-Type = Framed-User
Framed-Protocol = PPP
NAS-Identifier = "pptp-gw01.nas"
NAS-Port = 55
NAS-Port-Type = Virtual
User-Name = "[EMAIL PROTECTED]"
Calling-Station-Id = "y.y.y.y"
Called-Station-Id = "x.x.x.x"
MS-CHAP-Domain = "whatever"
MS-CHAP-Challenge = 0x0437345f654a85c9
MS-CHAP-Response = 0x01010000000000000000000000000000000000000000000000004bde361ff118c8c37b1bb35919665a633466ec05a9c54401
NAS-IP-Address = x.x.x.x
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 1
modcall[authorize]: module "preprocess" returns ok for request 1
modcall[authorize]: module "chap" returns noop for request 1
modcall[authorize]: module "attr_filter" returns noop for request 1
rlm_realm: Looking up realm "whatever" for User-Name = "[EMAIL PROTECTED]"
rlm_realm: Found realm "cenergynetworks.com"
rlm_realm: Adding Stripped-User-Name = "6622-5505-5719-5980"
rlm_realm: Proxying request from user 6622-5505-5719-5980 to realm whatever
rlm_realm: Adding Realm = "whatever"
rlm_realm: Authentication realm is LOCAL.
modcall[authorize]: module "suffix" returns noop for request 1
radius_xlat: '[EMAIL PROTECTED]'
rlm_sql (sql): sql_set_user escaped user --> '[EMAIL PROTECTED]'
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM RadiusCheck WHERE Username = '[EMAIL PROTECTED]' ORDER BY id'
## RETURN:
## +----+------------------------------+----------------------+--------+----+
## | id | UserName | Attribute | Value | op |
## +----+------------------------------+----------------------+--------+----+
## | 62 | [EMAIL PROTECTED] | User-Password | 653106 | == |
## | 63 | [EMAIL PROTECTED] | Simultaneous-Use | 1 | := |
## | 64 | [EMAIL PROTECTED] | Huntgroup-Name | pptp | := |
## | 66 | [EMAIL PROTECTED] | Max-All-Session-Time | 30 | := | <- ATTRIBUTE IN QUESTION
## +----+------------------------------+----------------------+--------+----+
## 4 rows in set (0.00 sec)
rlm_sql (sql): Reserving sql socket id: 23
radius_xlat: 'SELECT RadiusGroupCheck.id,RadiusGroupCheck.GroupName,RadiusGroupCheck.Attribute,RadiusGroupCheck.Value,RadiusGroupCheck.op FROM RadiusGroupCheck,RadiusUsers WHERE RadiusUsers.Username = '[EMAIL PROTECTED]' AND RadiusUsers.isActive='y' AND RadiusUsers.GroupName = RadiusGroupCheck.GroupName ORDER BY RadiusGroupCheck.id'
## RETURN:
## +----+------------+---------------+----------+----+
## | id | GroupName | Attribute | Value | op |
## +----+------------+---------------+----------+----+
## | 10 | CENPPTP064 | NAS-Port-Type | Ethernet | := |
## | 11 | CENPPTP064 | Pool-Name | pptp | := |
## +----+------------+---------------+----------+----+
## 2 rows in set (0.00 sec)
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM RadiusReply WHERE Username = '[EMAIL PROTECTED]' ORDER BY id'
## RETURN:
## NONE
radius_xlat: 'SELECT RadiusGroupReply.id,RadiusGroupReply.GroupName,RadiusGroupReply.Attribute,RadiusGroupReply.Value,RadiusGroupReply.op FROM RadiusGroupReply,RadiusUsers WHERE RadiusUsers.Username = '[EMAIL PROTECTED]' AND RadiusUsers.isActive='y' AND RadiusUsers.GroupName = RadiusGroupReply.GroupName ORDER BY RadiusGroupReply.id'
## RETURN:
## +----+------------+-----------------------+---------------+----+
## | id | GroupName | Attribute | Value | op |
## +----+------------+-----------------------+---------------+----+
## | 25 | CENPPTP064 | Framed-IP-Netmask | 255.255.255.0 | = |
## | 27 | CENPPTP064 | Acct-Interim-Interval | 60 | = |
## | 28 | CENPPTP064 | Rate-Limit | 64k/64k | = |
## | 29 | CENPPTP064 | Service-Type | Framed-User | = |
## | 30 | CENPPTP064 | Framed-Protocol | PPP | = |
## +----+------------+-----------------------+---------------+----+
## 5 rows in set (0.01 sec)
rlm_sql (sql): Released sql socket id: 23
modcall[authorize]: module "sql" returns ok for request 1
users: Matched DEFAULT at 3
users: Matched DEFAULT at 9
modcall[authorize]: module "files" returns ok for request 1
rlm_mschap: Found MS-CHAP attributes. Setting 'Auth-Type = MS-CHAP'
modcall[authorize]: module "mschap" returns ok for request 1
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
modcall[authorize]: module "PrePaidSessionCounter" returns noop for request 1
## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
##Radius config:
## modules {
## ...
## sqlcounter PrePaidSessionCounter {
## counter-name = Max-All-Session-Time
## check-name = Max-All-Session-Time
## sqlmod-inst = sql
## key = User-Name
## reset = never
## query = "SELECT SUM(AcctSessionTime) FROM RadiusAccounting WHERE UserName='%{%k}'"
## # The query returns a NULL value because the username never logged in before...
## }
## ...
##}
##
##instantiate {
## ...
## PrePaidSessionCounter
## ...
##}
##
##authorize {
## preprocess
## chap
## attr_filter
## suffix
## sql
## files
## mschap
## PrePaidSessionCounter
## ...
##}
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
modcall[authorize]: module "DailyCounter" returns noop for request 1
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
modcall[authorize]: module "MonthlyCounter" returns noop for request 1
modcall: group authorize returns ok for request 1
rad_check_password: Found Auth-Type MS-CHAP
auth: type "MS-CHAP"
Processing the authenticate section of radiusd.conf
modcall: entering group Auth-Type for request 1
rlm_mschap: Told to do MS-CHAPv1 with NT-Password
modcall[authenticate]: module "mschap" returns ok for request 1
modcall: group Auth-Type returns ok for request 1
Processing the session section of radiusd.conf
modcall: entering group session for request 1
radius_xlat: '[EMAIL PROTECTED]'
rlm_sql (sql): sql_set_user escaped user --> '[EMAIL PROTECTED]'
radius_xlat: 'SELECT COUNT(*) FROM RadiusAccounting WHERE UserName='[EMAIL PROTECTED]' AND AcctStopTime = 0'
rlm_sql (sql): Reserving sql socket id: 22
rlm_sql (sql): Released sql socket id: 22
modcall[session]: module "sql" returns ok for request 1
modcall: group session returns ok for request 1
Login OK: [EMAIL PROTECTED] (from client pptp-gw01 port 55 cli x.x.x.x)
Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 1
modcall[post-auth]: module "wireless" returns noop for request 1
rlm_ippool: Searching for an entry for nas/port: x.x.x.x/55
rlm_ippool: Allocating ip to nas/port: x.x.x.x/55
rlm_ippool: num: 1
rlm_ippool: Allocated ip 198.18.16.108 to client on nas x.x.x.x,port 55
modcall[post-auth]: module "pptp" returns ok for request 1
modcall: group post-auth returns ok for request 1
Sending Access-Accept of id 55 to x.x.x.x:1029
Framed-IP-Netmask = 255.255.255.0
Acct-Interim-Interval = 60
Rate-Limit = "64k/64k"
Service-Type = Framed-User
Framed-Protocol = PPP
Framed-MTU = 576
Framed-Compression = Van-Jacobson-TCP-IP
Framed-IP-Address = 198.18.16.108
Finished request 1
Going to the next request
--
Chris
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

