Sunday, August 9, 2009

LDAP的密码

ldap认证和密码加密被一些邮件服务器使用,比如eyou。

print "

Change password ";
if(ldap_mod_replace ($ldapconn, "uid=".$username.",dc=example,dc=com",
array('userpassword' => "{MD5}".base64_encode(pack("H*",md5($newpass))) {
print "succeded"; } else { print "failed"; }
print ".

\n";

No comments:

Post a Comment