Blank spaces after username - problem with accounting - MySql database.
Alan DeKok
aland at deployingradius.com
Tue Jan 22 11:18:23 CET 2008
Marinko Tarlac wrote:
> Well it is more than one account and they are random usernames (example,
> mirije, drogbba, etc. )
FreeRADIUS does not add spaces to user names. Again, run it in
debugging mode to see *exactly* what it is seeing.
> Inside sql.conf everything seems fine.
> ....
> sql_user_name = "%{User-Name}"
> .....
Then run the server in debugging mode to see WHY "test-user " is being
treated the same as "test-user". The user names are NOT the same, and
should NOT be treated identically.
> Also, accounting queries are also the same. ???
Once you fix the authentication so that users with spaces are not
authenticated, the accounting should fix itself.
In 2.0.0, you can simply put this at the *start* of the "authorize"
section:
if ("%{User-Name}" =~ / /) {
reject
}
It won't fix the problem, but it will ensure that the users get rejected.
Alan DeKok.
More information about the Freeradius-Users
mailing list