我是武男, 24歲, 大家都叫我阿男...有的人還會叫我白目研究生...找我的話請Google "武男" 就沒錯了~

PHP-LDAP_ADD Add Active Directory® Account How To

Autor 白目研究生

看完刪除AD Account後,就是新增使用者的部分

References:

http://www.php.net/manual/en/function.ldap-add.php

Source Code : Download

ldap_add

可以注意的是有關於密碼這個attribute分成了兩個~

userPassword與unicodePwd

可以辨別出的差異在這裡提出了說明:

userpassword is only accepted for auth, and unicodepwd is not readable by ldap.

以圖例來舉證的話~

下圖是用LDAP ADMIN新增cn_test的密碼呈現的結果,(SHA1)

ldap_add4

如果硬要使用Create Unicode Password的方式

把密碼塞給userPassword這個attribute的話

會只看到一個字元

也就是

$newPassword = 『\』』 . $pwdtxt . 『\』";

上面標註的那個字元

ldap_add2

還有~

看不見任何unicodePwd attribute的結果~

不過可以確定的是~

在這個case,就算沒有可視的unicodePwd

還是可以進行密碼的驗證~

ldap_add3

Random Posts

請留言

CommentComment