{"id":822,"date":"2025-08-29T13:55:53","date_gmt":"2025-08-29T11:55:53","guid":{"rendered":"https:\/\/blog.chloesoe.ch\/?p=822"},"modified":"2025-08-29T13:55:53","modified_gmt":"2025-08-29T11:55:53","slug":"389-directory-server-ldap-commands","status":"publish","type":"post","link":"https:\/\/blog.chloesoe.ch\/?p=822","title":{"rendered":"389 Directory Server LDAP Commands"},"content":{"rendered":"<p>Password for &quot;Directory Manager&quot; can be found in \/etc\/dirsrv\/setup-ds.inf <\/p>\n<p>Search Directory:<\/p>\n<pre><code># -W will ask for the password\n# cn=config to see the config\nldapsearch -b &quot;cn=config&quot; -D &quot;cn=Directory Manager&quot; -W\n\n# search for Daniel:\nldapsearch -b &quot;uid=jon.doe,ou=People,dc=example,dc=net&quot; -D &quot;cn=Directory Manager&quot; -W\n\n# filter your search, only Group CISO RFC 2254 https:\/\/datatracker.ietf.org\/doc\/html\/rfc2254\nldapsearch -b &quot;ou=Groups,dc=example,dc=net&quot; -D &quot;cn=Directory Manager&quot; -W &quot;(&amp; (cn=VSHN CISO) )&quot;\n\n# show ACL \/ ACI\nldapsearch -LLL -D &quot;cn=Directory Manager&quot; -W -x -b &quot;dc=example,dc=net&quot; -s sub &#039;(aci=*)&#039; aci  \n\n# show all objects in the ldap directory, e.g. if you set up a new an want to see what&#039;s in it\nldapsearch -x -D &quot;cn=Directory Manager&quot; -W -x -b &quot;&quot; -s base &quot;(objectclass=*)&quot;\nldapsearch -x -D &quot;cn=Directory Manager&quot; -w $(sed -rn &#039;s\/^RootDNPwd = (.*)$\/\\1\/p&#039; \/etc\/dirsrv\/setup-ds.inf) -x -b &quot;&quot; -s base &quot;(objectclass=*)&quot;\nldapsearch -x -D &quot;cn=Directory Manager&quot; -w $(sed -rn &#039;s\/^RootDNPwd = (.*)$\/\\1\/p&#039; \/etc\/dirsrv\/setup-ds.inf) -x -b &quot;dc=example,dc=net&quot; &quot;(objectclass=*)&quot;<\/code><\/pre>\n<p>Some commands from bash history.<\/p>\n<pre><code>lapsearch -D &quot;cn=Directory Manager&quot; -b &quot;cn=schema&quot; -W\nldapsearch &quot;cn=ReplicationAgreement,cn=replica,cn=dc\\=example\\,dc\\=net,cn=mapping tree,cn=config&quot;  -D &quot;cn=admin,cn=config&quot; -W\nldapsearch &quot;cn=changelog5,cn=config&quot;  -D &quot;admin&quot; -W\nldapsearch &quot;cn=changelog5,cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W\nldapsearch &quot;cn=changelog5,cn=config&quot;  -D &quot;cn=admin&quot; -W\nldapsearch &quot;cn=changelog5,cn=config&quot;  -D &quot;cn=admin,cn=config&quot; -W\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W  -LL\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W - -b  &quot;cn=memberOf task, cn=tasks,cn=config&quot;\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W - -b cn=config\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W - -b cn=config &quot;(objectclass=*)&quot; nsslapd-accesslog-logrotationtime nsslapd-accesslog-logrotationtimeunit nsslapd-accesslog-maxlogsize nsslapd-accesslog-maxlogsperdir\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W - -b cn=config &quot;(objectclass=top)&quot;\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W - -b cn=config -LLL\nldapsearch &quot;cn=config&quot;  -D &quot;cn=Directory Manager&quot; -W objectClass=ReplicationAgreement -LL\nldapsearch -D &quot;admin&quot; -b &quot;cn=schema&quot; -W\nldapsearch -D &quot;admin&quot; b &quot;cn=schema&quot; -W\nldapsearch -D &quot;cn=Directory Manager&quot; &quot;cn=changelog5,cn=config&quot; -W\nldapsearch -D &quot;cn=Directory Manager&quot; -W -x -b &quot;&quot; -s base &quot;(objectclass=*)&quot; aci\nldapsearch -D &quot;cn=Directory Manager&quot; -W -x -b &quot;ou=Groups,dc=example,dc=net&quot;\nldapsearch -D &quot;cn=directory manager&quot; -b &quot;dc=example,dc=net&quot; &quot;sAMAccountName=Domain Admins&quot; -W -LLL\nldapsearch -D &quot;cn=directory manager&quot; -b &quot;uid=jon.doe,ou=Customers,dc=example,dc=net&quot; -W\nldapsearch -D &quot;cn=directory manager&quot; -b &quot;uid=jon.doe,ou=People,dc=example,dc=net&quot; -W accountUnlockTime retryCountResetTime passwordRetryCount\nldapsearch -LLL -D &quot;cn=Directory Manager&quot; -W -x -b &quot;dc=example,dc=net&quot; nsRole\nldapsearch -LLL -D &quot;cn=Directory Manager&quot; -W -x -b &quot;dc=example,dc=net&quot; nsRole nsRoleDN\nldapsearch -LLL -D &quot;cn=Directory Manager&quot; -W -x -b &quot;dc=example,dc=net&quot; nsRole nsRoleDN nsRoleFilter\nldapsearch -LLL -D &quot;cn=admin,cn=Administrators,cn=config&quot; -W -b &quot;dc=example,dc=net&quot;\nldapsearch -LLL -D &quot;cn=admin,cn=Administrators,cn=config&quot; -W -b &quot;dc=example,dc=net&quot; &quot;(objectclass=*)&quot; aclEntry aclPropagate aclSource  entryOwner ownerPropagate ownerSource\nldapsearch -LLL -D &quot;cn=admin,cn=Administrators,cn=config&quot; -W -b &quot;ou=Groups,ou=TopologyManagement,o=NetscapeRoot&quot;\nldapsearch -LLL -b  &quot;cn=HR,ou=Groups,dc=example,dc=net&quot; -D &quot;cn=Directory Manager&quot; -W  <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Password for &quot;Directory Manager&quot; can be found in \/etc\/dirsrv\/setup-ds.inf Search Directory: # -W will ask for the password # cn=config to see the config ldapsearch -b &quot;cn=config&quot; -D &quot;cn=Directory Manager&quot; -W # search for Daniel: ldapsearch -b &quot;uid=jon.doe,ou=People,dc=example,dc=net&quot; -D &quot;cn=Directory Manager&quot; -W # filter your search, only Group CISO RFC 2254 https:\/\/datatracker.ietf.org\/doc\/html\/rfc2254 ldapsearch -b &quot;ou=Groups,dc=example,dc=net&quot;&#8230; <a href=\"https:\/\/blog.chloesoe.ch\/?p=822\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">389 Directory Server LDAP Commands<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-822","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=822"}],"version-history":[{"count":1,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/822\/revisions"}],"predecessor-version":[{"id":823,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/822\/revisions\/823"}],"wp:attachment":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}