{"id":4854,"date":"2014-03-23T23:24:23","date_gmt":"2014-03-23T15:24:23","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=4854"},"modified":"2023-04-28T09:48:19","modified_gmt":"2023-04-28T09:48:19","slug":"ldapsearch-examples-for-389-directory","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/ldapsearch-examples-for-389-directory\/","title":{"rendered":"Ldapsearch Examples for 389 Directory"},"content":{"rendered":"<p>This post will show you the list of ldapsearch examples for 389 Directory. This ldapsearch examples assumes the following:<\/p>\n<p>a)This ldapsearch is search for uid in the directory.<br \/>\nb)The 389 directory is configured to not support anonymous access, then the user &#8220;Directory Manager&#8221; and the password is required<br \/>\nc)This ldapsearch command has been run on the 389 server itself, so &#8220;localhost&#8221; for host is enough.<br \/>\nd)The server uses port number 389. Since this is the default port, the port number does not have to be sent in the search request. <\/p>\n<pre>\n-D binddn  bind DN\n-b basedn  base dn for search\n-h host    LDAP server\n-w passwd  bind password (for simple authentication)\n-W         prompt for bind password (Recommended to use this to hide password)\n<\/pre>\n<pre>\nldapsearch -h localhost -D \"cn=Directory Manager\" -W -b dc=ehowstuff,dc=local uid=user1\n<\/pre>\n<p>Example :<\/p>\n<pre>\n[root@ldapmaster-11 ~]# ldapsearch -h localhost -D \"cn=Directory Manager\" -W -b dc=ehowstuff,dc=local uid=user1\nEnter LDAP Password:\n# extended LDIF\n#\n# LDAPv3\n# base <dc =ehowstuff,dc=local> with scope subtree\n# filter: uid=user1\n# requesting: ALL\n#\n\n# user1, ehowstuff.local\ndn: uid=user1,dc=ehowstuff,dc=local\nuid: user1\ngivenName: user1\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetorgperson\nsn: test\ncn: user1 test\nuserPassword:: e1NTSEF9eTdNQTcyNUxnNjNPRXUxNUVkYk84TEJlTmp3M2d3Z3VoVEIreHc9PQ=\n =\n\n# search result\nsearch: 2\nresult: 0 Success\n\n# numResponses: 2\n# numEntries: 1\n<\/dc><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This post will show you the list of ldapsearch examples for 389 Directory. This ldapsearch examples assumes the following: a)This ldapsearch is search for uid in the directory. b)The 389&#8230;<\/p>\n","protected":false},"author":6,"featured_media":717,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1102],"tags":[1178,1251,1258,1536],"class_list":["post-4854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-389-directory-server","tag-389-directory","tag-centos-6","tag-centos-7","tag-linux"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=4854"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4854\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/717"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=4854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=4854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=4854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}