generate password in masscreate.php

This commit is contained in:
katagia 2003-06-25 19:40:14 +00:00
parent 46fb09b878
commit 55c8fbfc18
1 changed files with 5 additions and 0 deletions

View File

@ -214,6 +214,11 @@ switch ($select) {
creategroup($group);
}
$_SESSION['accounts'][$_SESSION['pointer']]->general_uidNumber = checkid($_SESSION['accounts'][$_SESSION['pointer']], 'user');
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$_SESSION['accounts'][$_SESSION['pointer']]->unix_password = base64_encode(mcrypt_encrypt(
MCRYPT_RIJNDAEL_256, $key, genpasswd(), MCRYPT_MODE_ECB, $iv));
$_SESSION['accounts'][$_SESSION['pointer']]->smb_password = $_SESSION['accounts'][$_SESSION['pointer']]->unix_password;
if ( time()-$time<(get_cfg_var('max_execution_time')-10)) {
$error = createuser($_SESSION['accounts'][$_SESSION['pointer']]);
if ($error==1) $_SESSION['pointer']++;