change_passwd.php3
来自「radius服务器」· PHP3 代码 · 共 31 行
PHP3
31 行
<?phprequire_once('../lib/ldap/functions.php3'); if ($config[ldap_write_server]) $ds = @ldap_connect($config[ldap_write_server]); else $ds = @ldap_connect($config[ldap_server]); if ($ds){ $r = @da_ldap_bind($ds,$config); if ($r){ if (is_file("../lib/crypt/$config[general_encryption_method].php3")){ include("../lib/crypt/$config[general_encryption_method].php3"); $passwd = da_encrypt($passwd); $passwd = '{' . $config[general_encryption_method] . '}' . $passwd; $mod[$attrmap['User-Password']] = $passwd; if ($config[ldap_debug] == 'true'){ print "<b>DEBUG(LDAP): ldap_mod_replace(): DN='$dn'</b><br>\n"; print "<b>DEBUG(LDAP): ldap_mod_replace(): Data:"; print_r($mod); print "</b><br>\n"; } @ldap_mod_replace($ds,$dn,$mod); if (@ldap_error($ds) != 'Success') echo "<b>LDAP ERROR: " . ldap_error($ds) . "</b><br>\n"; } else echo "<b>Could not open encryption library file.</b><br>\n"; } @ldap_close($ds); }?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?