{"id":6557,"date":"2025-04-29T17:08:40","date_gmt":"2025-04-29T14:08:40","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=6557"},"modified":"2025-04-29T17:08:40","modified_gmt":"2025-04-29T14:08:40","slug":"ldap-%d0%b7%d0%b1%d0%b8%d1%80%d0%b0%d1%94%d0%bc%d0%be-%d1%81%d1%82%d0%b0%d1%82%d0%b8%d1%81%d1%82%d0%b8%d0%ba%d1%83","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=6557","title":{"rendered":"[LDAP] \u0417\u0431\u0438\u0440\u0430\u0454\u043c\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443"},"content":{"rendered":"\n<p>\u041d\u0435\u0449\u043e\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0448\u0442\u043e\u0432\u0445\u043d\u0443\u0432\u0441\u044f \u043d\u0430 \u0446\u0456\u043a\u0430\u0432\u0443 \u0443\u0442\u0438\u043b\u0456\u0442\u0443 <a href=\"https:\/\/github.com\/openbsd\/src\/blob\/master\/usr.sbin\/ldapctl\/ldapctl.c\">ldapctl<\/a>, \u044f\u043a\u0430 \u0454 \u0442\u0456\u043b\u044c\u043a\u0438 \u0432 <strong>OpenBSD <\/strong>\u0456 \u0437\u0430\u0445\u043e\u0442\u0456\u043b\u043e\u0441\u044f \u043c\u0430\u0442\u0438 \u0456 \u0441\u043e\u0431\u0456 \u0442\u0430\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b. \u042f\u043a \u0432\u0438\u044f\u0432\u0438\u043b\u043e\u0441\u044f, \u0432\u0441\u0435 \u0446\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u043c\u043e\u0434\u0443\u043b\u0456 <strong>monitor<\/strong>.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0442\u0440\u0435\u0431\u0430 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438, \u0447\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <strong>monitor<\/strong>:<\/p>\n\n\n\n<p><code>$ slapd -VVV<br>...<br>monitor<br>...<\/code><\/p>\n\n<p><!--more--><\/p>\n\n<p>\u041e\u0442\u0436\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043b\u0430\u0441\u043d\u0435 \u0434\u043e \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c. \u0412 \u0431\u0430\u0433\u0430\u0442\u044c\u043e\u0445 \u043c\u0430\u043d\u0443\u0430\u043b\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0449\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0432 \u043a\u0456\u043d\u0435\u0446\u044c <strong>slapd.conf<\/strong>:<\/p>\n\n\n\n<p><code>database monitor<\/code><\/p>\n\n\n\n<p>\u0432 \u043a\u043e\u043d\u0444\u0456\u0433 \u0456 \u0432\u0441\u0435. \u0410\u043b\u0435 \u043d\u0456. \u0406 \u043f\u0440\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0438\u0445 \u0441\u043f\u0440\u043e\u0431\u0430\u0445 \u0431\u0443\u0434\u0435\u0442\u0435 \u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u0442\u0438 \u043f\u043e\u043c\u0438\u043b\u043a\u0443:<\/p>\n\n\n\n<p><code>No such object (32)<\/code><\/p>\n\n\n\n<p>\u0426\u044f \u043f\u043e\u043c\u0438\u043b\u043a\u0430 \u043c\u043e\u0436\u0435 \u0437\u0431\u0438\u0442\u0438 \u0437 \u043f\u0430\u043d\u0442\u0435\u043b\u0438\u043a\u0443, \u0430\u043b\u0435 \u0432\u043e\u043d\u0430 \u0442\u0430\u043a\u043e\u0436 \u043e\u0437\u043d\u0430\u0447\u0430\u0454, \u0449\u043e, \u043c\u043e\u0436\u043b\u0438\u0432\u043e, \u0432\u0438 \u043d\u0435 \u043c\u0430\u0454\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0443. \u041f\u043e \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044e \u0441\u0430\u043c\u0435 \u0442\u0430\u043a, \u0442\u043e\u043c\u0443 \u0446\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u0440\u0435\u0431\u0430 \u043e\u043f\u0438\u0441\u0430\u0442\u0438, \u043a\u043e\u043c\u0443 \u0432\u0437\u0430\u0433\u0430\u043b\u0456 \u043c\u043e\u0436\u043d\u0430 \u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443:<\/p>\n\n\n<pre>\ndatabase monitor\naccess to *\n        by self read\n        by dn.children=\"ou=services,dc=domain,dc=com\" read\n        by * none\n<\/pre>\n\n\n<p>\u0449\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0454, \u0449\u043e \u043b\u0438\u0448\u0435 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u0456 \u0437\u0430\u043f\u0438\u0441\u0438 \u0456\u0437 <strong>OU=services<\/strong> \u0431\u0443\u0434\u0443\u0442\u044c \u043c\u0430\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0438 \u0434\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n\n\n\n<p>\u041e\u0442\u0436\u0435, \u0442\u0435\u043f\u0435\u0440 \u043c\u043e\u0436\u043d\u0430 \u043f\u0440\u043e\u0431\u0443\u0432\u0430\u0442\u0438 \u0440\u043e\u0431\u0438\u0442\u0438 \u0437\u0430\u043f\u0438\u0442\u0438:<\/p>\n\n\n<pre>\n#!\/bin\/bash\n\nBASE=\"cn=Monitor\"\n\necho \"Start Time:\"\nldapsearch -x -LLL -b \"$BASE\" monitorTimestamp\n\necho \"Total Requests:\"\nldapsearch -x -LLL -b \"cn=Operations,$BASE\" \"(objectClass=monitorOperation)\" monitorOpInitiated\n\necho \"Search Requests:\"\nldapsearch -x -LLL -b \"cn=Search,cn=Operations,$BASE\" monitorOpInitiated\n\necho \"Bind Requests:\"\nldapsearch -x -LLL -b \"cn=Bind,cn=Operations,$BASE\" monitorOpInitiated\n\necho \"Modify Requests:\"\nldapsearch -x -LLL -b \"cn=Modify,cn=Operations,$BASE\" monitorOpInitiated\n\necho \"Active Connections:\"\nldapsearch -x -LLL -b \"cn=Connections,$BASE\" monitorCounter\n\necho \"Active Searches (Initiated - Completed):\"\nldapsearch -x -LLL -b \"cn=Search,cn=Operations,$BASE\" monitorOpInitiated monitorOpCompleted\n<\/pre>\n\n\n<p>\u0412\u0437\u0430\u0433\u0430\u043b\u0456, \u044f\u043a\u0449\u043e \u0432\u0438 \u043f\u043e\u043c\u0456\u0442\u0438\u043b\u0438, \u0442\u043e \u0437\u0430\u043f\u0438\u0442\u0438 \u0440\u043e\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u043e \u043e\u043a\u0440\u0435\u043c\u043e\u0433\u043e <strong>CN=monitor<\/strong>, \u0430 \u043d\u0435 \u0434\u043e &#8220;\u0431\u0430\u0437\u0438&#8221; <strong>dc=domain,dc=com<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0435\u0449\u043e\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0448\u0442\u043e\u0432\u0445\u043d\u0443\u0432\u0441\u044f \u043d\u0430 \u0446\u0456\u043a\u0430\u0432\u0443 \u0443\u0442\u0438\u043b\u0456\u0442\u0443 ldapctl, \u044f\u043a\u0430 \u0454 \u0442\u0456\u043b\u044c\u043a\u0438 \u0432 OpenBSD \u0456 \u0437\u0430\u0445\u043e\u0442\u0456\u043b\u043e\u0441\u044f \u043c\u0430\u0442\u0438 \u0456 \u0441\u043e\u0431\u0456 \u0442\u0430\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b. \u042f\u043a \u0432\u0438\u044f\u0432\u0438\u043b\u043e\u0441\u044f, \u0432\u0441\u0435 \u0446\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u043c\u043e\u0434\u0443\u043b\u0456 monitor. \u0414\u043b\u044f \u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0442\u0440\u0435\u0431\u0430 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438, \u0447\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c monitor: $ slapd -VVV&#8230;monitor&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,13],"tags":[],"class_list":["post-6557","post","type-post","status-publish","format-standard","hentry","category-others","category-security"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6557"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6557\/revisions"}],"predecessor-version":[{"id":6558,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6557\/revisions\/6558"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}