- OpenLDAP - Wikipedia #ril
$ ldapsearch -x -h $LDAP_SERVER -b dc=example,dc=com uid=$USERNAME
參考資料:
- The ldapsearch, ldapdelete and ldapmodify utilities #ril
ldapsearch在ldap_search(3)library call 上包裝一層 shell accessible interface,可以用在搜尋 LDAP 裡的 entries。ldapsearch會連線到 LDAP server、bind (驗證),然後根據 filter (要符合 RFC 1558) 搜尋,若找到多個 entry 會全部列出來。預設會印出所有 attribute,除非有指定attrs,例如ldasearch -u -b 'o=TUDelft,c=NL' 'cn=Luiz Malere' sn mail。
- ldapsearch(1) #ril
ldapsearch [OPTION]... [FILTER],其中FILTER預設是(objectClass=*)
ldapwhoami 可以用來驗證 credential,例如:
$ ldapwhoami -x -h $LDAP_SERVER -D cn=$USERNAME,ou=people,dc=example,dc=com -W
Enter LDAP Password:
dn:xxx,ou=people,dc=example,dc=com
參考資料:
- ldapwhoami #ril
- 連線到 LDAP server、通過 bind operation,再執行 whoami operation -- 應該就是印出自己的 DN?
- 範例提到
ldapwhoami -x -D "cn=Manager,dc=example,dc=com" -W,可以用來確認 LDAP 密碼是否正確。
- RFC 4532 - Lightweight Directory Access Protocol (LDAP) "Who am I?" Operation #ril
- Install OpenLDAP In Ubuntu 15.10 And Debian 8 | Unixmen (2015-11-27) #ril
- Step-by-step OpenLDAP Installation and Configuration #ril
- 24.6. OpenLDAP Setup Overview #ril
社群:
手冊: