Code

Updated and tested, smbhash generation after fresh setup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Jan 2007 05:46:53 +0000 (05:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Jan 2007 05:46:53 +0000 (05:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5657 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions_setup.inc

index 7d41ffd9586ea098f34505e041639ae356a5199a..0db0df0d2d205ffbf28d0e0082b61bbc596ff70e 100644 (file)
@@ -420,7 +420,7 @@ function perform_additional_checks(&$faults)
   $alt = 0;
 
   if (!$have_mkntpwd){
-    $query= "LC_ALL=C LANG=C perl -MCrypt::SmbHash -e 'ntlmgen \"PASSWD\", \$lm, \$nt; print \"\${lm}:\${nt}\\n\";' &>/dev/null";
+    $query= 'LC_ALL=C LANG=C perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen $ARGV[0]), $/;" &>/dev/null';
     system ($query, $ret);
     $alt= ($ret == 0);
   }
@@ -505,7 +505,7 @@ function parse_contrib_conf()
   } elseif (preg_match("/^Usage: mkntpwd /", shell_exec ("mkntpwd 2>&1"))){
     $pwdhash= "mkntpwd";
   } else {
-    $pwdhash=('perl -MCrypt::SmbHash -e "ntlmgen \"\$ARGV[0]\", \$lm, \$nt; print \"\${lm}:\${nt}\n\";" $1');
+    $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen $ARGV[0]), $/;"';
   }