From: Tomas K. <to...@us...> - 2006-01-06 17:54:20
|
> I'm trying to get the change_sqlpass plugin to work with my setup. > > > > I'm running FreeBSD 6, with Postfix, and I used Postfixadmin to setup all > the users/domains. Postfixadmin creates md5crypt style passwords. > > Postfixadmin has a function to generate its own salt for the passwords. > > > Since this salt is not defined anywhere, I temporarily assigned a static > salt to $csp_salt_static. I just defined a set of 8 characters... > > > > I'm now getting this error: > > > PHP Fatal error: Call to undefined function: md5crypt() in > /usr/local/www/squirrelmail/plugins/change_sqlpass/functions.php on line > 668, > referer: https://www.mydomain.com/smail/plugins/change_sqlpass/options.php > > > > The md5crypt.php file is in the same directory.....I'm not a programmer > and I know next to nothing about PHP, so I'm not sure how this is called. 1. SquirrelMail contains function that can generate random strings for salting. GenerateRandomString(8,'./',7); number of chars, extra salt characters, 7 = use alphanumeric chars for salt 2. md5 crypt salt is 12 characters. $1$ + 8 alphanumerics and ./ + $ 3. md5 crypt is supported by Linux glibc2 and BSD libraries. PHP supports md5 crypt on Windows too. Still trying to understand why people use third party library without clear licensing information when they can use standard php function. Try replacing "md5crypt($password, $salt)" call in line 668 with "crypt($password, $salt)" call. Salt must be formated according to md5 crypt salting rules. http://www.php.net/crypt See also https://sourceforge.net/tracker/index.php?func=detail&aid=1369355&group_id=311&atid=300311 -- Tomas |