Code

Updated password encryption method for gosa.conf
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Jun 2009 06:58:07 +0000 (06:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Jun 2009 06:58:07 +0000 (06:58 +0000)
-The attribute 'password' was renamed to 'adminPassword' -> The passwords wern't encrypted.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13797 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/bin/gosa-encrypt-passwords

index 67365e24746b545a4cdae99d6db7db6a898f2e0e..05568bdb81b41babee787ad7f8e7cc294eb62292 100755 (executable)
@@ -66,7 +66,9 @@ $conf->encoding = 'UTF-8';
 $referrals= $conf->getElementsByTagName("referral");
 echo "* encrypting existent passwords with master key\n";
 foreach($referrals as $referral){
-  $pw= $referral->attributes->getNamedItem("password");
+  $user = $referral->attributes->getNamedItem("adminDn");
+  echo "* encrypting password for: ".$user->nodeValue."\n";
+  $pw= $referral->attributes->getNamedItem("adminPassword");
   $pw->nodeValue= cred_encrypt($pw->nodeValue, $master_key);
 }