diff --git a/include/variables.inc b/include/variables.inc index 29945e1047958601af328982d66778cb322f78a5..d8981e3b0beb532482006958f376f0c31670245b 100644 --- a/include/variables.inc +++ b/include/variables.inc @@ -74,4 +74,7 @@ define("SMARTY3", "/usr/share/php/smarty3/Smarty.class.php"); /* name of the class.cache file */ define("CLASS_CACHE", "class.cache"); +/* name of the utility used to create windows passwords */ +define ("MKNTPWD", "/usr/bin/fusiondirectory-mkntpassword"); + ?> diff --git a/setup/class_setupStep_Config2.inc b/setup/class_setupStep_Config2.inc index 45f2555b86af5192728a9126ecbfe123620ba8d6..e80bfeb7fd0a3c42adf814aa0be7fc6874afd0ab 100644 --- a/setup/class_setupStep_Config2.inc +++ b/setup/class_setupStep_Config2.inc @@ -61,12 +61,12 @@ class Step_Config2 extends setup_step $this->mail_methods = $this->get_available_mail_classes(); /* Look for samba password generation method */ - if(file_exists("/usr/bin/fusiondirectory-mkntpassword")){ - $pwdhash = "/usr/bin/fusiondirectory-mkntpassword"; - } elseif (preg_match("/^Usage: fusiondirectory-mkntpassword /", shell_exec ("mkntpwd 2>&1"))){ - $pwdhash= "mkntpwd"; + if(file_exists(MKNTPWD)){ + $pwdhash = MKNTPWD; + } elseif (preg_match("/^Usage: fusiondirectory-mkntpassword <password>/", shell_exec (MKNTPWD))){ + $pwdhash = MKNTPWD; } else { - $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"'; + $pwdhash = 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"'; } $this->timezones = timezone::_get_tz_zones();