DialUp Admin And Crypt Passwords
Hi I got the Freeradius version 1.0.4 setup with MySql. It is all working fine. However, when creating users through the dialup admin, the password is stored in the database without the salt key for md5, and this is causing the users' access request to be rejected. If the password is created through the unix passwd utility and then updated in the sql database, that user can authenticate successfully. Has anyone came across this problem? Thanks for your help Gef
Hi Further to my previous post, I managed to get around this problem By default, md5 passwords are generated without the key appended. To solve: Change the file /usr/local/dialup_admin/lib/crypt/md5.php3 from <?php function da_encrypt($passwd) { return md5($passwd); } ?> with the following <?php function da_encrypt($passwd) { $salt = NULL; for ($i = 0; $i < 8; $i++) { $salt .= substr('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', rand(0,61), 1); } $salt = '$1$'.$salt.'$'; return crypt($passwd, $salt); } ?> I hope this helps someone else :-) Gef -----Original Message----- From: freeradius-users-bounces@lists.freeradius.org [mailto:freeradius-users-bounces@lists.freeradius.org] On Behalf Of Geoffrey Cauchi Sent: 04 September 2005 16:45 To: freeradius-users@lists.freeradius.org Subject: DialUp Admin And Crypt Passwords Hi I got the Freeradius version 1.0.4 setup with MySql. It is all working fine. However, when creating users through the dialup admin, the password is stored in the database without the salt key for md5, and this is causing the users' access request to be rejected. If the password is created through the unix passwd utility and then updated in the sql database, that user can authenticate successfully. Has anyone came across this problem? Thanks for your help Gef - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (1)
-
Geoffrey Cauchi