I was using CAP + FreeRADIUS + Mysql with hotspotlogin.cgi as my captive portal login page and all worked fine. Sadly hotspotlogin.cgi is not very easy to maintain or modify so I decided to use a JSON based login page. Its source is here:
<br /> MedTV Hotspot</p> <p>
It is pretty basic. I fount it while browsing the topics in the forum. The problem with it however is that my radius server doesn't authenticate my users while I'm using this page. I looked the debug info of freeradius - it complains about a missing chap password:
rad_check_password: Found Auth-Type CHAP
auth: type "CHAP"rad_check_password: Found Auth-Type CHAP
auth: type "CHAP"
Processing the authenticate section of radiusd.conf
modcall: entering group CHAP for request 2
rlm_chap: login attempt by "fred" with CHAP password
rlm_chap: Could not find clear text password for user chap
modcall[authenticate]: module "chap" returns invalid for request 2
modcall: leaving group CHAP (returns invalid) for request 2
auth: Failed to validate the user.
Processing the authenticate section of radiusd.conf
modcall: entering group CHAP for request 2
rlm_chap: login attempt by "fred" with CHAP password
rlm_chap: Could not find clear text password for user fred
modcall[authenticate]: module "chap" returns invalid for request 2
modcall: leaving group CHAP (returns invalid) for request 2
auth: Failed to validate the user.
Re: Issues with FreeRADIUS when using JSON login page
Thanks again, David. You're a lifesaver. My bosses want this hotspot prototype to be ready by tomorrow, so I'm really stressed out. I managed to achieve what I was looking for by playing with the javascript in chilliContoller.js. Now everything seems to work fine. About that uam secret fix you said - it would be really nice if there was information next to the box saying something like "leave the field empty if you'll be using JSON based captive portal". Info like this would save a lot of people a lot of trouble.
Re: Issues with FreeRADIUS when using JSON login page
Thanks for the info -- I'll allow uamsecret to be blank in the next release. I'm considering another minor patch release (to allow for a couple more WifiDog configurations) and I'll slip this fix in. As for the redirect after login, you could do it with a little javascript work - bringing more of the default code (the default j/s loaded from chilli) into your page directly to modify it. I'll look into making it a bit easier than that...
Re: Issues with FreeRADIUS when using JSON login page
Thanks, David. It worked. I cannot however remove the uam secret from the web interface. I get "Error in UAM Secret: No value entered". I don't use auto configuration. I saw that if I choose radius as an auto configuration method there was no uas secret field, but there I do not understand the purpose of two other fields - "Config Name (username)" and "Config Password". What are those for? And one more question - what should I add to this simple page so that the user is redirected from it to a constant site some 5 seconds after he/she logs in successfully?
Re: Issues with FreeRADIUS when using JSON login page
Be sure you're not using a uamsecret when using the JSON interface. Either remove the configuration from your chilli.conf or leave it empty.