Hello, please help me with SQL integration
For Sinton
forsin at inbox.kg
Thu Feb 27 18:24:33 CET 2014
sorry ... pressed enter
in output
(0) [sql] = notfound ---- ????
(0) } # authorize = notfound ---- ??
it's means that user was not found in DB ??
----- Исходное сообщение -----
От: "For Sinton" <forsin at inbox.kg>
Кому: "FreeRadius users mailing list" <freeradius-users at lists.freeradius.org>
Отправленные: Четверг, 27 Февраль 2014 г 23:23:29
Тема: Re: Hello, please help me with SQL integration
Hello,
Problem is that i can not get it worked properly
For right now i'm using this config
sites-enabled/default
....
authorize {
sql
}
authenticate {
}
preacct {
}
accounting {
sql
}
session {
sql
}
post-auth {
sql
}
pre-proxy {
}
post-proxy {
}
}
DB:
mysql> select * from radcheck;
+----+----------+--------------------+----+-------+
| id | UserName | Attribute | op | Value |
+----+----------+--------------------+----+-------+
| 2 | test1 | Cleartext-Password | := | test1 |
+----+----------+--------------------+----+-------+
1 row in set (0.00 sec)
mysql>
request
root at gateway:~ # radtest test1 test1 localhost 10 testing123
Sending Access-Request of id 21 from 0.0.0.0 port 50050 to 127.0.0.1 port 1812
User-Name = 'test1'
User-Password = 'test1'
NAS-IP-Address = 127.0.0.1
NAS-Port = 10
Message-Authenticator = 0x00
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=21, length=20
root at gateway:~ #
debug output
rad_recv: Access-Request packet from host 127.0.0.1 port 50050, id=21, length=75
User-Name = 'test1'
User-Password = 'test1'
NAS-IP-Address = 127.0.0.1
NAS-Port = 10
Message-Authenticator = 0xb3ccee4c6e189e6e66a18585c2353e98
(0) # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
(0) authorize {
(0) sql : expand: "%{User-Name}" -> 'test1'
(0) sql : SQL-User-Name set to 'test1'
rlm_sql (sql): Reserved connection (4)
(0) 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 = 'test1' ORDER BY id'
rlm_sql (sql): Executing query: 'SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE UserName = 'test1' ORDER BY id'
(0) sql : expand: "SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority" -> 'SELECT groupname FROM radusergroup WHERE username = 'test1' ORDER BY priority'
rlm_sql (sql): Executing query: 'SELECT groupname FROM radusergroup WHERE username = 'test1' ORDER BY priority'
rlm_sql (sql): Released connection (4)
rlm_sql (sql): Closing connection (0): Too many free connections (5 > 3)
(0) [sql] = notfound ---- ????
(0) } # authorize = notfound ---- ??
(0) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject
(0) Failed to authenticate the user.
(0) Using Post-Auth-Type Reject
(0) WARNING: Unknown value specified for Post-Auth-Type. Cannot perform requested action.
(0) # Executing group from file /usr/local/etc/raddb/sites-enabled/default
(0) Finished request 0.
Waking up in 0.3 seconds.
Waking up in 0.6 seconds.
(0) Sending delayed reject
Sending Access-Reject of id 21 from 127.0.0.1 port 1812 to 127.0.0.1 port 50050
Waking up in 4.9 seconds.
(0) Cleaning up request packet ID 21 with timestamp +6
Ready to process requests.
what does it means?
----- Исходное сообщение -----
От: "Alan DeKok" <aland at deployingradius.com>
Кому: "FreeRadius users mailing list" <freeradius-users at lists.freeradius.org>
Отправленные: Четверг, 27 Февраль 2014 г 23:37:47
Тема: Re: Hello, please help me with SQL integration
For Sinton wrote:
> it's same result
Use "radiusd -X". Any addition "-x" is just annoying.
> Thu Feb 27 21:06:30 2014 : Debug: rlm_sql (sql): Executing query: 'SELECT COUNT(*) FROM radcheck WHERE username = 'fredf' ORDER BY id'
> Thu Feb 27 21:06:30 2014 : Debug: (0) SQL query returned no results
That's the problem? That seems obvious.
Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list