[Chilli] External uam server(json_html.tmpl)

John Green onlineprogamers at gmail.com
Wed Aug 17 08:46:50 UTC 2011


Hi guys,

I have installed and configure coovachilli version 1.2.7 , freeradius 2.1.7
and mysql 5.2 on a same box (CentOS 5.6).
I named it as box1.If/When I makes a connection from my laptop to the box1
port eth1, there are no problem,
any url will redirect (coova.html) to json login page.After log in, I can
see the json status page then
click the original url to continue browsing.

chilli config file
....
...
...
HS_RADIUS=myip1
HS_RADIUS2=myip1
HS_RADSECRET=mysecret
HS_UAMSERVER=myip1
HS_UAMFORMAT=http://myip1/uam/
HS_UAMHOMEPAGE=http://myip1:myport/www/coova.html
....
...
...
myip1 = public ip

Then I installed and configure coovachilli version 1.2.7 on another box. I
name it as box2 (still CentOS 5.6) but
I point the uamservser and radius to the 1st box. Any url will redirect to
json login page but
after enter username and password, nothing happen on the login page.

at 1st, box1 and box2 have same chilli configuration

chilli config file
....
...
...
HS_RADIUS=myip1
HS_RADIUS2=myip1
HS_RADSECRET=mysecret
HS_UAMSERVER=myip2
HS_UAMFORMAT=http://myip2/uam/
HS_UAMHOMEPAGE=http://myip2:myport/www/coova.html
....
...
...
myip2 = public ip

There are no problem, only when I changed the uamserver, point to box1 uam.

chilli config file box2
....
....
...
HS_RADIUS=myip1
HS_RADIUS2=myip1
HS_RADSECRET=mysecret
HS_UAMSERVER=myip1
HS_UAMFORMAT=http://myip1/uam/index.html
HS_UAMHOMEPAGE=http://myip1/uam/coova.html
....
....
....

case 1,
username = arsene
password = test123
username and password are valid.

>From radiusd -X

Waking up in 4.9 seconds.
Cleaning up request 34 ID 15 with timestamp +3006
Ready to process requests.
rad_recv: Access-Request packet from host box2.box2.box2.box2 port 55871,
id=17, length=236
        ChilliSpot-Version = "1.2.7"
        User-Name = "arsene"
        CHAP-Challenge = 0x51edb4c4aaa4898d76018a2c6b65911d
        CHAP-Password = 0x00a49ad12ee79fcb32e3dbc00d08edd580
        Service-Type = Login-User
        Acct-Session-Id = "4e4b6f6e00000001"
        Framed-IP-Address = 10.0.0.2
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 1
        NAS-Port-Id = "00000001"
        Calling-Station-Id = "BC-AE-C5-4A-67-8A"
        Called-Station-Id = "00-04-23-CE-28-81"
        NAS-IP-Address = 10.0.0.1
        NAS-Identifier = "hotspot"
        WISPr-Logoff-URL = "http://10.0.0.1:3990/logoff"
        Message-Authenticator = 0xe3b34607a829086ae7288888896da869
+- entering group authorize {...}
++[preprocess] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap] returns ok
++[mschap] returns noop
[suffix] No '@' in User-Name = "arsene", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[sql]   expand: %{User-Name} -> arsene
[sql] sql_set_user escaped user --> 'arsene'
rlm_sql (sql): Reserving sql socket id: 2
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = 'arsene'           ORDER BY id
WARNING: Found User-Password == "...".
WARNING: Are you sure you don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more information.
[sql] User found in radcheck table
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = 'arsene'           ORDER BY id
[sql]   expand: SELECT groupname           FROM radusergroup           WHERE
username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
groupname           FROM radusergroup           WHERE username =
'arsene'           ORDER BY priority
rlm_sql (sql): Released sql socket id: 2
++[sql] returns ok
++? if (notfound)
? Evaluating (notfound) -> FALSE
++? if (notfound) -> FALSE
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[noresetQuotaLimit] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[expirationdate] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthup] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthdown] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[FOCmonthlyresetcounter] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
++[expiration] returns noop
++? if (userlock)
? Evaluating (userlock) -> FALSE
++? if (userlock) -> FALSE
++[logintime] returns noop
[pap] Found existing Auth-Type, not changing it.
++[pap] returns noop
Found Auth-Type = CHAP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!    Replacing User-Password in config items with Cleartext-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Please update your configuration so that the "known good"
!!!
!!! clear text password is in Cleartext-Password, and not in User-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+- entering group CHAP {...}
[chap] login attempt by "arsene" with CHAP password
[chap] Using clear text password "test123" for user arsene authentication.
[chap] Password check failed
++[chap] returns reject
Failed to authenticate the user.
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject]     expand: %{User-Name} -> arsene
 attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 35 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 35
Sending Access-Reject of id 17 to box2.box2.box2.box2 port 55871
Waking up in 4.9 seconds.
Cleaning up request 35 ID 17 with timestamp +3097
Ready to process requests.



case 2,
username = arsene
password = abc123
username valid but not password.

>From radiusd -X

Ready to process requests.
rad_recv: Access-Request packet from host box2.box2.box2.box2 port 50833,
id=15, length=236
        ChilliSpot-Version = "1.2.7"
        User-Name = "arsene"
        CHAP-Challenge = 0x32bfb315e2fddb0b7393de2568f8c0b4
        CHAP-Password = 0x00e0559e504ade88abcebc04542d659a2d
        Service-Type = Login-User
        Acct-Session-Id = "4e4b6ef600000001"
        Framed-IP-Address = 10.0.0.2
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 1
        NAS-Port-Id = "00000001"
        Calling-Station-Id = "BC-AE-C5-4A-67-8A"
        Called-Station-Id = "00-04-23-CE-28-81"
        NAS-IP-Address = 10.0.0.1
        NAS-Identifier = "hotspot"
        WISPr-Logoff-URL = "http://10.0.0.1:3990/logoff"
        Message-Authenticator = 0x7ba5682d606dc8ce34b37df504f1df47
+- entering group authorize {...}
++[preprocess] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap] returns ok
++[mschap] returns noop
[suffix] No '@' in User-Name = "arsene", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[sql]   expand: %{User-Name} -> arsene
[sql] sql_set_user escaped user --> 'arsene'
rlm_sql (sql): Reserving sql socket id: 3
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = 'arsene'           ORDER BY id
WARNING: Found User-Password == "...".
WARNING: Are you sure you don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more information.
[sql] User found in radcheck table
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = 'arsene'           ORDER BY id
[sql]   expand: SELECT groupname           FROM radusergroup           WHERE
username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
groupname           FROM radusergroup           WHERE username =
'arsene'           ORDER BY priority
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok
++? if (notfound)
? Evaluating (notfound) -> FALSE
++? if (notfound) -> FALSE
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[noresetQuotaLimit] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[expirationdate] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthup] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthdown] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[FOCmonthlyresetcounter] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
++[expiration] returns noop
++? if (userlock)
? Evaluating (userlock) -> FALSE
++? if (userlock) -> FALSE
++[logintime] returns noop
[pap] Found existing Auth-Type, not changing it.
++[pap] returns noop
Found Auth-Type = CHAP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!    Replacing User-Password in config items with Cleartext-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Please update your configuration so that the "known good"
!!!
!!! clear text password is in Cleartext-Password, and not in User-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+- entering group CHAP {...}
[chap] login attempt by "arsene" with CHAP password
[chap] Using clear text password "test123" for user arsene authentication.
[chap] Password check failed
++[chap] returns reject
Failed to authenticate the user.
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject]     expand: %{User-Name} -> arsene
 attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 34 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 34
Sending Access-Reject of id 15 to box2.box2.box2.box2 port 50833
Waking up in 4.9 seconds.
Cleaning up request 34 ID 15 with timestamp +3006
Ready to process requests.



case 3,

username = SAF
password = rival
username and password not valid.


>From radius -X

Waking up in 4.9 seconds.
Cleaning up request 32 ID 8 with timestamp +2823
Ready to process requests.
rad_recv: Access-Request packet from host box2.box2.box2.box2 port 41610,
id=11, length=233
        ChilliSpot-Version = "1.2.7"
        User-Name = "SAF"
        CHAP-Challenge = 0x67be2b82c613c1eb21b317307a14fbac
        CHAP-Password = 0x00ec42738159f87a63866400682ee82e91
        Service-Type = Login-User
        Acct-Session-Id = "4e4b6eb700000001"
        Framed-IP-Address = 10.0.0.2
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 1
        NAS-Port-Id = "00000001"
        Calling-Station-Id = "BC-AE-C5-4A-67-8A"
        Called-Station-Id = "00-04-23-CE-28-81"
        NAS-IP-Address = 10.0.0.1
        NAS-Identifier = "hotspot"
        WISPr-Logoff-URL = "http://10.0.0.1:3990/logoff"
        Message-Authenticator = 0x99d5960453f117f966f9930ce0307ca1
+- entering group authorize {...}
++[preprocess] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap] returns ok
++[mschap] returns noop
[suffix] No '@' in User-Name = "SAF", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[sql]   expand: %{User-Name} -> SAF
[sql] sql_set_user escaped user --> 'SAF'
rlm_sql (sql): Reserving sql socket id: 4
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = 'SAF'           ORDER BY id
[sql]   expand: SELECT groupname           FROM radusergroup           WHERE
username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
groupname           FROM radusergroup           WHERE username =
'SAF'           ORDER BY priority
rlm_sql (sql): Released sql socket id: 4
[sql] User SAF not found
++[sql] returns notfound
++? if (notfound)
? Evaluating (notfound) -> TRUE
++? if (notfound) -> TRUE
++- entering if (notfound) {...}
+++[reply] returns notfound
++- if (notfound) returns notfound
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[noresetQuotaLimit] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[expirationdate] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthup] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthdown] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[FOCmonthlyresetcounter] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
++[expiration] returns noop
++? if (userlock)
? Evaluating (userlock) -> FALSE
++? if (userlock) -> FALSE
++[logintime] returns noop
[pap] WARNING! No "known good" password found for the user.  Authentication
may fail because of this.
++[pap] returns noop
Found Auth-Type = CHAP
+- entering group CHAP {...}
[chap] login attempt by "SAF" with CHAP password
[chap] Cleartext-Password is required for authentication
++[chap] returns invalid
Failed to authenticate the user.
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject]     expand: %{User-Name} -> SAF
 attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 33 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 33
Sending Access-Reject of id 11 to box2.box2.box2.box2 port 41610
        Reply-Message = "Login Failed. Please check your Username and
Password."
Waking up in 4.9 seconds.
Cleaning up request 33 ID 11 with timestamp +2885
Ready to process requests.

Case 1 and 2 give same radius -X result.

Im using default(got those files after install coovachilli)files inside
/usr/local/etc/chilli/www/
I create uam folder /var/www/html/uam/
and I donwload default index.html file and chilli.js and put inside uam/
folder.

what make me confius is

if I change my uamformat to standard(default hotspotlogin.cgi or
chillispotlogin.php)
uamsecret inside .php or .cgi = mysecret
so my chilli config become like this:-

chilli config file
....
...
...
HS_UAMSECRET=mysecret
HS_RADIUS=myip1
HS_RADIUS2=myip1
HS_RADSECRET=mysecret
HS_UAMSERVER=myip1
HS_UAMFORMAT=http://myip1/uam/
HS_UAMHOMEPAGE=http://myip1:myport/www/coova.html
....
...
...
Any url will redirect to login page.
I can see the login page ( not json login page) and I can successfully
login.

Here is radiusd -X

Ready to process requests.
rad_recv: Access-Request packet from host box2.box2.box2.box2 port 40411,
id=20, length=217
        ChilliSpot-Version = "1.2.7"
        User-Name = "arsene"
        User-Password = "test123"
        Service-Type = Login-User
        Acct-Session-Id = "4e4b759a00000001"
        Framed-IP-Address = 10.0.0.2
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 1
        NAS-Port-Id = "00000001"
        Calling-Station-Id = "BC-AE-C5-4A-67-8A"
        Called-Station-Id = "00-04-23-CE-28-81"
        NAS-IP-Address = 10.0.0.1
        NAS-Identifier = "hotspot"
        WISPr-Logoff-URL = "http://10.0.0.1:3990/logoff"
        Message-Authenticator = 0xfb38cc10210034081001ce401f2893cf
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
[suffix] No '@' in User-Name = "arsene", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[sql]   expand: %{User-Name} -> arsene
[sql] sql_set_user escaped user --> 'arsene'
rlm_sql (sql): Reserving sql socket id: 2
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = 'arsene'           ORDER BY id
WARNING: Found User-Password == "...".
WARNING: Are you sure you don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more information.
[sql] User found in radcheck table
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = 'arsene'           ORDER BY id
[sql]   expand: SELECT groupname           FROM radusergroup           WHERE
username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
groupname           FROM radusergroup           WHERE username =
'arsene'           ORDER BY priority
rlm_sql (sql): Released sql socket id: 2
++[sql] returns ok
++? if (notfound)
? Evaluating (notfound) -> FALSE
++? if (notfound) -> FALSE
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[noresetQuotaLimit] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[expirationdate] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthup] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[bandwidthdown] returns noop
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
++[FOCmonthlyresetcounter] returns noop
++? if (reject)
? Evaluating (reject) -> FALSE
++? if (reject) -> FALSE
++[expiration] returns noop
++? if (userlock)
? Evaluating (userlock) -> FALSE
++? if (userlock) -> FALSE
++[logintime] returns noop
++[pap] returns updated
Found Auth-Type = PAP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!    Replacing User-Password in config items with Cleartext-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Please update your configuration so that the "known good"
!!!
!!! clear text password is in Cleartext-Password, and not in User-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+- entering group PAP {...}
[pap] login attempt with password "test123"
[pap] Using clear text password "test123"
[pap] User authenticated successfully
++[pap] returns ok
+- entering group post-auth {...}
[reply_log]     expand:
/var/log/radius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d ->
/var/log/radius/radacct/box2.box2.box2.box2/reply-detail-20110817
[reply_log] /var/log/radius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d
expands to /var/log/radius/radacct/box2.box2.box2.box2/reply-detail-20110817
[reply_log]     expand: %t -> Wed Aug 17 16:00:25 2011
++[reply_log] returns ok
[sql]   expand: %{User-Name} -> arsene
[sql] sql_set_user escaped user --> 'arsene'
[sql]   expand: %{User-Password} -> test123
[sql]   expand: INSERT INTO radpostauth                           (username,
pass, reply, authdate)                           VALUES
(                           '%{User-Name}',
'%{%{User-Password}:-%{Chap-Password}}',
'%{reply:Packet-Type}', '%S') -> INSERT INTO
radpostauth                           (username, pass, reply,
authdate)                           VALUES (
'arsene',                           'test123',
'Access-Accept', '2011-08-17 16:00:25')
rlm_sql (sql) in sql_postauth: query is INSERT INTO
radpostauth                           (username, pass, reply,
authdate)                           VALUES (
'arsene',                           'test123',
'Access-Accept', '2011-08-17 16:00:25')
rlm_sql (sql): Reserving sql socket id: 1
rlm_sql (sql): Released sql socket id: 1
++[sql] returns ok
[sql_log] Processing sql_log_postauth
[sql_log]       expand: %{User-Name} -> arsene
[sql_log]       expand: %{%{User-Name}:-DEFAULT} -> arsene
[sql_log] sql_set_user escaped user --> 'arsene'
[sql_log] WARNING: Deprecated conditional expansion ":-".  See "man unlang"
for details
[sql_log]       expand: INSERT INTO radpostauth
(username, pass, reply, authdate) VALUES
('%{User-Name}', '%{User-Password:-Chap-Password}',
'%{reply:Packet-Type}', '%S'); -> INSERT INTO
radpostauth                       (username, pass, reply, authdate)
VALUES                       ('arsene', 'test123',
'Access-Accept', '2011-08-17 16:00:25');
[sql_log]       expand: /var/log/radius/radacct/sql-relay ->
/var/log/radius/radacct/sql-relay
++[sql_log] returns ok
++[exec] returns noop
Sending Access-Accept of id 20 to box2.box2.box2.box2 port 40411
Finished request 67.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Accounting-Request packet from host box2.box2.box2.box2 port
58016, id=13, length=164
        ChilliSpot-Version = "1.2.7"
        ChilliSpot-Acct-View-Point = ChilliSpot-Client-View-Point
        Event-Timestamp = "Aug 17 2011 16:02:47 MYT"
        Acct-Status-Type = Start
        User-Name = "arsene"
        Acct-Session-Id = "4e4b759a00000001"
        Framed-IP-Address = 10.0.0.2
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 1
        NAS-Port-Id = "00000001"
        Calling-Station-Id = "BC-AE-C5-4A-67-8A"
        Called-Station-Id = "00-04-23-CE-28-81"
        NAS-IP-Address = 10.0.0.1
        NAS-Identifier = "hotspot"
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] Hashing 'NAS-Port = 1,Client-IP-Address =
box2.box2.box2.box2,NAS-IP-Address = 10.0.0.1,Acct-Session-Id =
"4e4b759a00000001",User-Name = "arsene"'
[acct_unique] Acct-Unique-Session-ID = "b0073ddfcd6e1d2e".
++[acct_unique] returns ok
[suffix] No '@' in User-Name = "arsene", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
+- entering group accounting {...}
[detail]        expand:
/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d ->
/var/log/radius/radacct/box2.box2.box2.box2/detail-20110817
[detail] /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands
to /var/log/radius/radacct/box2.box2.box2.box2/detail-20110817
[detail]        expand: %t -> Wed Aug 17 16:00:25 2011
++[detail] returns ok
++[unix] returns ok
[radutmp]       expand: /var/log/radius/radutmp -> /var/log/radius/radutmp
[radutmp]       expand: %{User-Name} -> arsene
++[radutmp] returns ok
[sql]   expand: %{User-Name} -> arsene
[sql] sql_set_user escaped user --> 'arsene'
[sql]   expand: %{Acct-Delay-Time} ->
[sql]   expand:            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,    xascendsessionsvrkey,
WISPrLocationName)           VALUES             ('%{Acct-Session-Id}',
'%{Acct-Unique-Session-Id}',              '%{SQL-User-Name}',
'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
'%{NAS-Port-Type}', '%S', NULL,              '0', '%{Acct-Authentic}',
'%{Connect-Info}',              '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-I
rlm_sql (sql): Reserving sql socket id: 0
rlm_sql_mysql: MYSQL check_error: 1054 received
[sql] Couldn't insert SQL accounting START record - Unknown column
'username' in 'where clause'
[sql]   expand: %{Acct-Delay-Time} ->
[sql]   expand:            UPDATE radacct SET              acctstarttime
= '%S',              acctstartdelay    =
'%{%{Acct-Delay-Time}:-0}',              connectinfo_start =
'%{Connect-Info}'           WHERE acctsessionid  =
'%{Acct-Session-Id}'           AND username         =
'%{SQL-User-Name}'           AND nasipaddress     = '%{NAS-IP-Address}'
->            UPDATE radacct SET              acctstarttime     =
'2011-08-17 16:00:25',              acctstartdelay    = '0',
connectinfo_start = ''           WHERE acctsessionid  =
'4e4b759a00000001'           AND username         = 'arsene'           AND
nasipaddress     = '10.0.0.1'
rlm_sql (sql): Released sql socket id: 0
++[sql] returns ok
[sql_log] Processing sql_log_accounting
[sql_log]       expand: %{User-Name} -> arsene
[sql_log]       expand: %{%{User-Name}:-DEFAULT} -> arsene
[sql_log] sql_set_user escaped user --> 'arsene'
[sql_log]       expand: INSERT INTO radacct (AcctSessionId, UserName,
NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime,
AcctSessionTime, AcctTerminateCause) VALUES
('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}',
'%{Framed-IP-Address}', '%S', '0', '0', ''); -> INSERT INTO radacct
(AcctSessionId, UserName,          NASIPAddress, FramedIPAddress,
AcctStartTime, AcctStopTime,    AcctSessionTime, AcctTerminateCause)
VALUES                    ('4e4b759a00000001', 'arsene', '10.0.0.1',
'10.0.0.2', '2011-08-17 16:00:25', '0', '0', '');
[sql_log]       expand: /var/log/radius/radacct/sql-relay ->
/var/log/radius/radacct/sql-relay
++[sql_log] returns ok
[attr_filter.accounting_response]       expand: %{User-Name} -> arsene
 attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] returns updated
Sending Accounting-Response of id 13 to box2.box2.box2.box2 port 58016
Finished request 68.
Cleaning up request 68 ID 13 with timestamp +4599
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 67 ID 20 with timestamp +4599
Ready to process requests.




Im not good in programming (html/js/php). Could anyone point me where my
mistake is and perhaps can give me some advice to solve this case.


One more thing,

If I connect to coovaAP(syslink), uam server point to uam ser box1 (splash
page coova.html then format index.html to show json login page,
I received the same result from radiusd -X but I can successfuly login if I
point to uam server (hotspotlogin.cgi or chillispotlogin.php).


Thanks in advance.

.....
Opochot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20110817/43cdc24c/attachment-0001.html>


More information about the Chilli mailing list