驗證 AD ldap

# AD port number

LDAP (unencrypted): 389

LDAPS (LDAP over SSL/TLS): 636

# linux command

yum install -y openldap-clients

ldapsearch -x -H ldap://1.1.1.1 -b "dc=ssorc,dc=local" -D "cn=cross,dc=ssorc,dc=local" -W

# php

error_reporting(E_ALL);
ini_set('display_errors', 'On');

$ldap_bind = @ldap_bind($ldap_conn, "cn=$username,$ldap_base_dn", $password);

if (!$ldap_bind)
{
    echo "LDAP Bind failed: " . ldap_error($ldap_conn);
}
Related posts 相關文章
打擊 google youtube 看廣告的作法
More...
gitlab 出現 cannot unblock ldap blocked users 問題
More...
微軟用了很多錢買了 corp.com 網域
More...
架設 GitLab 作 Git 版本控管(二) – 整合 LDAP
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。