]> andersk Git - sql-web.git/blobdiff - batch/signup.php
use nicepass for batch signup passwords
[sql-web.git] / batch / signup.php
index 50041296f75041e1d943c9ff7722046961c5405b..99785226b2b3dc2ce762eadf19bc86910f300094 100755 (executable)
@@ -8,6 +8,8 @@ require_once('batch.inc.php');
 
 $myUsername = $argv[1];
 $myUID = $argv[3];
+if ($myUID<100) exit('bad UID');
+
 $hescmd = "hesinfo $myUsername passwd";
 $hesinfo = explode(':', trim(exec($hescmd)));
 if (count($hesinfo)>=4) {
@@ -17,9 +19,8 @@ if (count($hesinfo)>=4) {
        $myName = $myUsername;
 }
 $myEmail = $myUsername.'@mit.edu';
-$myPassword = substr(md5(uniqid()),0,8);
-
-if ($myUID<100) exit('bad UID');
+$myPassword = trim(exec(dirname(__FILE__).'/../bin/nicepass.py'));
+if (empty($myPassword)) exit('bad Password');
 
 $Login = new Login($myUsername);
 if (!$Login->exists() && !empty($myUsername)) {
This page took 0.038674 seconds and 4 git commands to generate.