I am using rlm_dbm with increasing success. :) However I recently ran
into a problem; for some reason, rlm_dbm seems to compare the username
of a request with the password of an entry:
Ready to process requests.
rad_recv: Access-Request packet from host 127.0.0.1:58048, id=192, length=108
User-Name = "test1"
CHAP-Password = 0xc06cde1289e2860d28c71eb190aad0b4e3
NAS-IP-Address = 130.67.10.1
NAS-Port-Id = "0"
NAS-Port-Type = Async
Service-Type = Framed-User
Framed-Protocol = PPP
Calling-Station-Id = "22332211"
Called-Station-Id = "153381007007"
Acct-Session-Id = "379094840"
modcall: entering group authorize
modcall[authorize]: module "suffix" returns ok
modcall[authorize]: module "files" returns notfound
rlm_dbm: try open database file: /home/b/bn/radius/raddb/users.db
rlm_dbm: Call parse_user:
sm_parse_user.c: check for loops
Add test1 to user list
sm_parse_user: start parsing: user: test1
* parse buffer: <<Password == "1test", User-Category == "isdnuser">>
* rlm_dbm: recod parsed
* comparing request pattern test1 of type 1 to 1test
* rlm_dbm: patern not matched, reply skiped
Remove test1 from user list
sm_parse_user.c: check for loops
Add DEFAULT to user list
rlm_dbm: User <DEFAULT> not foud in database
Remove DEFAULT from user list
modcall[authorize]: module "dbm" returns notfound
modcall: group authorize returns ok
auth: No Auth-Type configuration for the request, rejecting the user
auth: Failed to validate the user.
Delaying request 0 for 1 seconds
Finished request 0
The problem occurs, as far as I can determine, in the four lines marked
with a "*". Especially note the line where it says it's comparing "test1"
to "1test"; "test1" is the username, "1test" is the password. This is a
dump of the user database:
ducati(bn) radius 363$ bin/rlm_dbm_cat -f raddb/users.db
isdnuser Auth-Type := Local, Called-Station-Id !~ "^1533"
prfxti Auth-Type := Local, Called-Station-Id =~ "^1533"
test1 Password == "1test", User-Category == "isdnuser"
Reply-Message = "Login ok"
ducati(bn) radius 364$
I'm working my way through the code, but if someone has a hint, they
will save me hours of cursing. :-)
--
We tend to meet any new situation by reorganising; and a wonderful method
it can be for creating the illusion of progress while producing confusion,
inefficiency and demoralisation. -- Gaius Petronius, 60 AD
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html