Re: dialup admin coding - help required

2006-12-22 Thread Gaddis, Jeremy L.

On 12/21/06, Cory Robson [EMAIL PROTECTED] wrote:

Anyway this is my code for my failed login page, my sql query does parse all
information into the array ok but I just cannot seem to get it to output on
screen. Any way here is what I have so far anyone able to assist in showing
me where I'm going wrong.


First, see Owen's reply (which I haven't quoted).  I believe he's
nailed the issue and his code would most likely work, though I would
do it like this:

[snip code]


*// Here is my screen output, obviously I need to loop through the array and
output the lines but just can't figure it out. *//

tr align=center bgcolor=white


td?php print $num; ?/td
td?php print $acct_login; ?/td
td?php print $acct_password; ?/td
td?php print $acct_time; ?/td
td?php print $acct_terminate_cause; ?/td
td?php print $acct_calling; ?/td


/tr
/table


[snip code]

Both Owen's code and mine should have the same effect, however I've
found that the above is sometimes easier to read and keep track of.
And I like to keep my HTML and PHP blocks separate as much as
possible.

-j

--
Jeremy L. Gaddis, MCP, GCWN
http://www.linuxwiz.net/
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


radius+mysql weird problem

2006-12-22 Thread Jorge Minassian - Comintec

Hello all !,

After upgrading Fedora from FC2 to FC4, I got what is described below from 
log (radiusd -X)
If I query database manually, I get all info about users (all users are 
correctly on DB), but radius still says No matching entry in the database 


If using files, it works OK.
I tried to downgrade DB (from 4.1 to 3.23), also reinstal freeradius from 
rpm or compiled by me, but problem persists.

Have someone any ad about this ?.
I will apreciate any help to troubleshoot this problem !.

Thank you very much,
Jorge.



Ready to process requests.
rad_recv: Access-Request packet from host localhost:56607, id=27, length=55
   User-Name = 000
   User-Password = 1234
   NAS-IP-Address = 255.255.255.255
   NAS-Port = 1
modcall: entering group authorize for request 0
 modcall[authorize]: module preprocess returns ok for request 0
   rlm_realm: No '@' in User-Name = 000, looking up realm NULL
   rlm_realm: No such realm NULL
 modcall[authorize]: module suffix returns noop for request 0
radius_xlat:  '000'
rlm_sql (sql): sql_set_user escaped user -- '000'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE 
Username = '000' ORDER BY id'

rlm_sql (sql): Reserving sql socket id: 4
radius_xlat:  'SELECT 
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op 
FROM radgroupcheck,usergroup WHERE usergroup.Username = '000' AND 
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radreply WHERE 
Username = '000' ORDER BY id'
radius_xlat:  'SELECT 
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op 
FROM radgroupreply,usergroup WHERE usergroup.Username = '000' AND 
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'

rlm_sql (sql): No matching entry in the database for request from user [000]
rlm_sql (sql): Released sql socket id: 4
 modcall[authorize]: module sql returns notfound for request 0
modcall: group authorize returns ok for request 0
auth: No authenticate method (Auth-Type) configuration found for the 
request: Rejecting the user

auth: Failed to validate the user.
Login incorrect: [000/1234] (from client gabriel port 1)
Sending Access-Reject of id 27 to localhost:56607
Finished request 0
Going to the next request


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


Re: radius+mysql weird problem

2006-12-22 Thread Alan DeKok
Jorge Minassian - Comintec wrote:
 Hello all !,
 
 After upgrading Fedora from FC2 to FC4, I got what is described below
 from log (radiusd -X)
 If I query database manually, I get all info about users (all users are
 correctly on DB), but radius still says No matching entry in the
 database 

  What is returned when you query the DB manually?  The contents of the
fields (operators, etc.) matter.

  Alan DeKok.
--
  http://deployingradius.com   - The web site of the book
  http://deployingradius.com/blog/ - The blog
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: radius+mysql weird problem

2006-12-22 Thread Jorge Minassian - Comintec
 Original Message - 
From: Alan DeKok [EMAIL PROTECTED]

To: FreeRadius users mailing list freeradius-users@lists.freeradius.org
Sent: Friday, December 22, 2006 10:23 PM
Subject: Re: radius+mysql weird problem



Jorge Minassian - Comintec wrote:

Hello all !,

After upgrading Fedora from FC2 to FC4, I got what is described below
from log (radiusd -X)
If I query database manually, I get all info about users (all users are
correctly on DB), but radius still says No matching entry in the
database 


 What is returned when you query the DB manually?  The contents of the
fields (operators, etc.) matter.

 Alan DeKok.


Alan,


mysql SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 
'000' ORDER BY id;

+--+--+---+---++
| id   | UserName | Attribute | Value | op |
+--+--+---+---++
| 1590 | 000  | Password  | 1234  | == |
+--+--+---+---++

op tried as  == and :=, same results.
Value as Password or User-Password, same resutls.


mysql SELECT 
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op

   - FROM radgroupcheck,usergroup WHERE usergroup.Username = '000' AND
   - usergroup.GroupName = radgroupcheck.GroupName ORDER BY 
radgroupcheck.id;

++---+--++--+
| id | GroupName | Attribute| Value  | op   |
++---+--++--+
|  1 | normal| Simultaneous-Use | 1  | ==   |
|  5 | normal| Huntgroup-Name   | normal | ==   |
++---+--++--+



mysql SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 
'000' ORDER BY id;

Empty set (0.02 sec)



mysql SELECT 
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op 
FROM radgroupreply,usergroup WHERE usergroup.Username = '000' AND 
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id

   - ;
++---++-+--+
| id | GroupName | Attribute  | Value   | op   |
++---++-+--+
|  3 | normal| Framed-Protocol| PPP | ==   |
|  4 | normal| Framed-Compression | Van-Jacobson-TCP-IP | ==   |
|  5 | normal| Framed-IP-Address  | 255.255.255.254 | ==   |
|  6 | normal| Service-Type   | Framed-User | ==   |
++---++-+--+
4 rows in set (0.01 sec)


Remember please, before upgrading same tables was working fine ...

Thank you,
Jorge.









--
 http://deployingradius.com   - The web site of the book
 http://deployingradius.com/blog/ - The blog
-
List info/subscribe/unsubscribe? See 
http://www.freeradius.org/list/users.html 


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