Freeradius authentication from Postgres?
Hello, Is it possible to get user authentication from an existing database containing fields for username and password and use this info in authenticating Radius users? What kind of configuration would this require, as I would not like to change the existing database structure with new fields and I just need the usernames and passwords from the database, any other required configurations can be done in static configuration files if needed. Effectively just replacing the following user file to be fetched from a database with username and password fields:
testuser Cleartext-Password := "password"
Anybody have example configurations for such a setup? Best regards, Kim Halavakoski khalavakoski@gmail.com Sent from my mobile device, excuse my clawfingerness!
On Jun 10, 2015, at 9:54 AM, Kim Halavakoski <khalavakoski@gmail.com> wrote:
Is it possible to get user authentication from an existing database containing fields for username and password and use this info in authenticating Radius users?
Yes. Just write an SQL query to do that.
What kind of configuration would this require, as I would not like to change the existing database structure with new fields and I just need the usernames and passwords from the database, any other required configurations can be done in static configuration files if needed.
That's fine.
Effectively just replacing the following user file to be fetched from a database with username and password fields:
testuser Cleartext-Password := "password"
Anybody have example configurations for such a setup?
In raddb/sites-available/default, in the authorize section, write: update control { Cleartext-Password := "%{sql:SELECT password FROM table where name = %{User-Name}}" } Or whatever SQL query works for you. Alan DeKok.
Hi,
Is it possible to get user authentication from an existing database containing fields for username and password and use this info in authenticating Radius users?
yes, just change the query
What kind of configuration would this require, as I would not like to change the existing database structure with new fields and I just need the usernames and passwords from the database, any other required configurations can be done in static configuration files if needed.
IF the attribute is just a password, then you can edit the query so that its just selecting the username and value (ie hardcode the attribute and op....) - but otherwise its the insert of some columns with some values alan
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Kim Halavakoski