PHP MD5 with appended salt
olivier at heliosnet.org
Wed Mar 6 18:00:18 CET 2013
On 06.03.2013 17:29, René Klomp wrote:
> Hi all,
> I am trying to connect my freeradius server to a mysql database containing all users. I created a new view to represent the table structure needed by freeradius, but I a problem with validating the passwords.
> The passwords of my users are (from a PHP application) concatenated with a salt, which is the same for all passwords, and stored using the regular php md5 function: md5($userpass . ':' . $salt)
> How can I make freeradius to append this salt to the password as well and validate the password in the correct way? Is there a default way to do this? Or should I create a module to do this?
First question, how are your users identifying with freeradius ? PAP ?
CHAP ? MSCHAP ? EAP ?
If the password is sent in clear by the user, you could use the md5 xlat
function then compare the value in your database.
Network & Security Engineer, HES-SO Fribourg
Mail: olivier at heliosnet.org
More information about the Freeradius-Users