function ldap_crypt_passwd($password, $salt, $stype){ if ($stype == "MD5") return "{CRYPT}" . crypt($password); //, $salt); //if ($stype=="MD5") return crypt($password,substr($salt,0,12)); //MD5 uses 12 chr salt } Source file does not exist! Usage: php convert.php [source_file] [template_file] > [target_file]