背景是公司的linux主機越來越多,想把賬號統一管理
公司有現成的windows域
在網上查了一些資料,理論上應該可以實作。
配置方法參考的自
https://www.jianshu.com/p/af295531eaf6
啟動正常沒有報錯
但就是查不到用戶
通過ldapsearch命令可以正常查詢到用戶串列
ldapsearch -H "ldap://192.168.1.16:389" -D "cn=ldap,cn=users,dc=test,dc=com" -w 'abcd1234' -b "cn=users,DC=test,DC=com" -x| grep sAMAccountName| wc -l
28
getent passwd 命令
debug資訊如下
nslcd: [334873] <passwd(all)> DEBUG: myldap_search(base="dc=test,dc=com", filter="(objectClass=posixAccount)")
nslcd: [334873] <passwd(all)> DEBUG: ldap_initialize(ldap://192.168.1.16/)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_rebind_proc()
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [334873] <passwd(all)> DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [334873] <passwd(all)> DEBUG: ldap_simple_bind_s("cn=ldap,cn=users,dc=test,dc=com","***") (uri="ldap://192.168.1.16/")
nslcd: [334873] <passwd(all)> DEBUG: ldap_result(): end of results (0 total)
也就是回傳結果是0條記錄
組態檔
cat /etc/nslcd.conf | grep -v ^# | grep -v "^$"
uid nslcd
gid ldap
uri ldap://192.168.1.16/
base dc=test,dc=com
binddn cn=ldap,cn=users,dc=test,dc=com
bindpw abcd1234
ssl no
tls_cacertdir /etc/openldap/cacerts
uj5u.com熱心網友回復:
有沒有大佬
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/71542.html
標籤:系統維護與使用區
上一篇:搭配lnmp環境,安裝testlink出現無法使用mysql
下一篇:求助安裝vmware tool
