本文整理匯總了PHP中Ldap::sambant方法的典型用法代碼示例。如果您正苦於以下問題:PHP Ldap::sambant方法的具體用法?PHP Ldap::sambant怎麽用?PHP Ldap::sambant使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Ldap
的用法示例。
在下文中一共展示了Ldap::sambant方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$info["authsmtpActive"] = isset($_POST['authsmtpactive']) ? "TRUE" : "FALSE";
}
// Cas d'un compte Samba
if ($conf['admin']['what'] == 2 || $conf['admin']['what'] == 3) {
$userRid = 2 * $info["uidNumber"] + 1000;
$info["sambaSID"] = $conf['samba']['sid'] . '-' . $userRid;
if (!empty($_POST['displayname'])) {
$info["displayName"] = Html::clean($_POST['displayname']);
}
$info["smbActive"] = isset($_POST['smbactive']) ? "TRUE" : "FALSE";
$info["sambaDomainName"] = $conf['samba']['dn'];
$tmp = getsambagroups('smb');
$info["sambaPrimaryGroupSID"] = $conf['samba']['sid'] . $tmp[$smbgroup];
$info["sambaPwdLastSet"] = strtotime("now");
$info["sambaLMPassword"] = Ldap::sambalm($_POST['pass1']);
$info["sambaNTPassword"] = Ldap::sambant($_POST['pass1']);
$info["shadowLastChange"] = floor(strtotime("now") / (3600 * 24));
$info["sambaPwdCanChange"] = "-2";
$info["sambaPwdMustChange"] = "2147483647";
$info["sambaKickoffTime"] = "2147483647";
$info["sambaAcctFlags"] = "[XU ]";
$info["shadowExpire"] = "-1";
$info["shadowInactive"] = "-1";
$info["shadowMax"] = "200";
$info["shadowMin"] = "0";
$info["shadowWarning"] = "30";
$info["shadowFlag"] = "-1";
}
$info["userPassword"] = "{SSHA}" . Ldap::ssha($_POST['pass1']);
$ldapconn = Ldap::lda_connect(LDAP_ADMIN_DN, LDAP_ADMIN_PASS);
// We use uid attribute for DN