]> jfr.im git - irc/evilnet/x3.git/commitdiff
tweaks to the conversion script
authorsirvulcan <redacted>
Fri, 9 Feb 2007 03:58:41 +0000 (03:58 +0000)
committersirvulcan <redacted>
Fri, 9 Feb 2007 03:58:41 +0000 (03:58 +0000)
ChangeLog
tools/ldap/ldap_convert.php

index 9f28a13274e685789b7aec5bb01152fae3fb6d17..a7bdf82d0548b0073cb37ac2303fd5e48d5a08b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
 /***********************************************************************
 X3 ChangeLog
 
+2007-02-09  Neil Spierling  <sirvulcan@gmail.com>
+
+       * tools/ldap/ldap_convert.php: Few tweaks.
+
+2007-02-08  Alex Schumann  <rubin@afternet.org>
+
+       * tools/ldap/inetorganon.schema: Scheme for ldap.
+
+       * tools/ldap/ldap_convert.php: Conversion script for converting
+       x3 users to the ldap server.
+
 2007-02-07  Alex Schumann  <rubin@afternet.org>
 
        * configure.in: adding compile/configure support for ssl libs (not
index 613602677fb4fd2a3c92668d6c0abf90f7f647f7..c5248ecdd5b455056b8e1b4d320b378372c51725 100755 (executable)
@@ -33,6 +33,7 @@ if (!extension_loaded('ldap'))
 $handle=fopen($db, r);
 $ns = 0;
 $add = 0;
+$np = 0;
 $parse = 0;
 
 if ($handle) {
@@ -98,13 +99,19 @@ if ($handle) {
                 $info["objectclass"][] = "inetOrgAnonAccount";
                 $info["uid"]=$user;
                 $info["mail"]=$email;
-                $info["userPassword"]='{MD5}'.base64_encode(pack('H*',$pass));
-
-#                $r=@ldap_add($ds, "uid=".$user.",$ldap_add", $info);
+               if ($pass[0] == "$") {
+                       $info["userPassword"] = "";
+                       echo "ALERT: $user ADDED WITH NO PASSWORD (old crypt style)\n";
+                       $alert = 1;
+                       $np++;
+               } else
+                       $info["userPassword"]='{MD5}'.base64_encode(pack('H*',$pass));
+
+                $r=@ldap_add($ds, "uid=".$user.",$ldap_add", $info);
                 if ($r) {
                     $add++;
                     echo "Added $user (email: $email) (pass: $pass)\n";
-                    print_r($info);
+                    /* print_r($info);*/
                 } else
                     echo "Failed adding $user (email: $email) (pass: $pass) - ". ldap_error($ds) ."\n";
 
@@ -129,5 +136,6 @@ $parse--;
 $parse--;
 echo "Processed $parse accounts.\n";
 echo "Added $add accounts to the ldap server\n";
-
+if (($alert == 1) && ($np > 0))
+       echo "ALERT: $np ACCOUNTS ADDED WITH NO PASSWORD (old crypt style)\n";
 ?>