SHA-encrypt passwords until crypt is supported by server
diff --git a/ldap.php b/ldap.php
index f203950..dcc2e46 100755
--- a/ldap.php
+++ b/ldap.php
@@ -157,8 +157,8 @@
         $dn = $data[0]["dn"];
 
         if ($ENCRYPT_PASSWORDS) {
-                $newEntry = ['userPassword' => "{crypt}" . crypt($new_password, '$6$' . generateSalt(10) . '$')];
-                # $newEntry = ['userPassword' => "{SHA}" .  base64_encode(sha1($new_password, true))];
+                # $newEntry = ['userPassword' => "{crypt}" . crypt($new_password, '$6$' . generateSalt(10) . '$')];
+                $newEntry = ['userPassword' => "{SHA}" .  base64_encode(sha1($new_password, true))];
         } else {
                 $newEntry = ['userPassword' => "{CLEAR}" .  $new_password];
         }