{"id":338,"date":"2011-07-12T12:34:33","date_gmt":"2011-07-12T12:34:33","guid":{"rendered":""},"modified":"2015-08-17T18:11:43","modified_gmt":"2015-08-17T16:11:43","slug":"dodawanie-indeksow-opendj","status":"publish","type":"post","link":"https:\/\/drfugazi.eu.org\/en\/dodawanie-indeksow-opendj\/","title":{"rendered":"Dodawanie indeks\u00f3w do OpenDJ"},"content":{"rendered":"<p class=\"qtranxs-available-languages-message qtranxs-available-languages-message-en\">Sorry, this entry is only available in <a href=\"https:\/\/drfugazi.eu.org\/pl\/wp-json\/wp\/v2\/posts\/338\" class=\"qtranxs-available-language-link qtranxs-available-language-link-pl\" title=\"Polski\">Polish<\/a>. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.<\/p><p>Indeksy to bardzo wa\u017cna rzecz w katalogu LDAP. Je\u015bli s\u0105 problemy wydajno\u015bciowe z katalogiem i zacznie si\u0119 szuka\u0107 przyczyn, to wszelkie dokumenty w sieci zalecaj\u0105 w pierwszej kolejno\u015bci w\u0142a\u015bnie sprawdzenie indeks\u00f3w. Indeksy mo\u017cna doda\u0107 importuj\u0105c odpowiednio przygotowanego LDIFa, np.:<\/p>\n<pre><code>\r\ndn: ds-cfg-attribute=accountActive,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config\r\nobjectClass: top\r\nobjectClass: ds-cfg-local-db-index\r\nds-cfg-index-entry-limit: 4000\r\nds-cfg-index-type: equality\r\nds-cfg-index-type: presence\r\nds-cfg-attribute: accountActive\r\n\r\ndn: ds-cfg-attribute=displayName,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config\r\nobjectClass: top\r\nobjectClass: ds-cfg-local-db-index\r\nds-cfg-index-entry-limit: 4000\r\nds-cfg-index-type: equality\r\nds-cfg-index-type: substring\r\nds-cfg-attribute: displayName\r\n\r\n<\/code><\/pre>\n<p>Zapisujemy jako np. <code>phamm-indexes.ldif<\/code> i importujemy do LDAPa:<\/p>\n<pre><code># .\/OpenDJ-2.4.3\/bin\/ldapmodify -a -D cn=dirmgr -f phamm-indexes.ldif \r\nPassword for user 'cn=dirmgr':\r\nProcessing ADD request for ds-cfg-attribute=accountActive,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config\r\nADD operation successful for DN ds-cfg-attribute=accountActive,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config\r\n...\r\nProcessing ADD request for ds-cfg-attribute=displayName,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config\r\nADD operation successful for DN ds-cfg-attribute=displayName,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config\r\n...\r\n<\/code><\/pre>\n<p>Za\u0142atwione? No prawie. System wcze\u015bniej nie wiedzia\u0142, \u017ce ma te atrybuty poindeksowa\u0107, trzeba wi\u0119c mu to nakaza\u0107:<\/p>\n<pre><code># .\/OpenDJ-2.4.3\/bin\/stop-ds\r\n# .\/OpenDJ-2.4.3\/bin\/rebuild-index -b dc=domain,dc=tld --rebuildAll\r\n...\r\n[12\/Jul\/2011:12:48:58 +0200] category=JEB severity=NOTICE msgID=8847510 msg=Due to changes in the configuration, index dc_domain_dc_tld_displayName is currently operating in a degraded state and must be rebuilt before it can be used\r\n[12\/Jul\/2011:12:48:58 +0200] category=JEB severity=NOTICE msgID=8847510 msg=Due to changes in the configuration, index dc_domain_dc_tld_accountActive is currently operating in a degraded state and must be rebuilt before it can be used\r\n...\r\n[12\/Jul\/2011:12:48:59 +0200] category=JEB severity=NOTICE msgID=8847538 msg=DN phase two processing completed. Processed 2 DNs\r\n[12\/Jul\/2011:12:48:59 +0200] category=JEB severity=NOTICE msgID=8847493 msg=Rebuild complete. Processed 2 entries in 0 seconds (average rate 2.2\/sec)\r\n# .\/OpenDJ-2.4.3\/bin\/start-ds\r\n<\/code><\/pre>\n<p>Na razie mam tylko dwa wpisy, wi\u0119c indeksy przebudowuj\u0105 si\u0119 szybko, przy kilkunastu tysi\u0105cach entry mo\u017ce to troch\u0119 potrwa\u0107, warto wi\u0119c zadba\u0107 o indeksy od razu.<\/p>\n<p>Indeksy aktualizuj\u0105 si\u0119 automatycznie przy dodawaniu nowych wpis\u00f3w za pomoc\u0105 <code>ldapmodify<\/code> (<code>ldapadd<\/code>). Natomiast je\u015bli importujemy wpisy wprost do backendu, to nale\u017cy pami\u0119ta\u0107 o przebudowie indeks\u00f3w.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sorry, this entry is only available in Polish. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.Indeksy to&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[115],"tags":[6,88],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7M9Tz-5s","jetpack-related-posts":[{"id":341,"url":"https:\/\/drfugazi.eu.org\/en\/unique-attributes-opendj\/","url_meta":{"origin":338,"position":0},"title":"Unique attributes in OpenDJ","author":"drfugazi","date":"Monday July 25th, 2011","format":false,"excerpt":"Sometimes you need to set some attributes as unique, for example: if LDAP contains system users, then uid attribute shouldn't repeat in whole system. OpenDJ is equipped with proper plugin, but it's not enabled by default. In case of mail system, attribute mail should be unique. Here we don't have\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":285,"url":"https:\/\/drfugazi.eu.org\/en\/konfiguracja\/","url_meta":{"origin":338,"position":1},"title":"Konfiguracja OpenDJ","author":"drfugazi","date":"Monday July 11th, 2011","format":false,"excerpt":"Po rozpakowaniu i instalacji OpenDJ jest wst\u0119pnie skonfigurowany. W moim przypadku posiada te\u017c wpis bazowy (base entry), tutaj niech to b\u0119dzie dc=domain,dc=tld. Je\u015bli kto\u015b dopiero buduje drzewo LDAP, to pewnie teraz doda sobie standardowe ou=People i tam b\u0119dzie umieszcza\u0142 u\u017cytkownik\u00f3w za pomoc\u0105 narz\u0119dzi do zarz\u0105dzania katalogiem LDAP. Zwykle jednak jest\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":354,"url":"https:\/\/drfugazi.eu.org\/en\/opendj-online-schema-modification\/","url_meta":{"origin":338,"position":2},"title":"OpenDJ &#8211; online schema modification","author":"drfugazi","date":"Tuesday June 19th, 2012","format":false,"excerpt":"I wrote before about schema conversion to LDIF format and how to add schemas offline by uploading them to config\/schema directory in OpenDJ. Now I will describe how to extend schema online, without restart LDAP server. Most if not all LDAP servers now have possibility to modify configuration and schemas\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":337,"url":"https:\/\/drfugazi.eu.org\/en\/dodawanie-schematow-opendj\/","url_meta":{"origin":338,"position":3},"title":"Dodawanie schemat\u00f3w do OpenDJ","author":"drfugazi","date":"Tuesday July 12th, 2011","format":false,"excerpt":"Sorry, this entry is only available in Polish. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.OpenDJ podobnie jak inne us\u0142ugi katalogowe pozwala na rozszerzanie funkcjonalno\u015bci katalogu poprzez dodawanie schemat\u00f3w. Istnieje szereg gotowych schemat\u00f3w,\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":685,"url":"https:\/\/drfugazi.eu.org\/en\/autofs-in-ldap-configuration-linux-solaris\/","url_meta":{"origin":338,"position":4},"title":"Autofs in LDAP configuration &#8211; for Linux and Solaris","author":"drfugazi","date":"Friday November 25th, 2016","format":false,"excerpt":"If you have LDAP server as user repository it is also good to have NFS server to store their home directories. To avoid autofs map configuration on every host, you can use LDAP service to store maps. I assume that NFS server (NFSHOME) is already installed, LDAP server and client\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"LDAP DIT","src":"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/06\/LDAP-DIT.jpg?fit=1200%2C1016&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/06\/LDAP-DIT.jpg?fit=1200%2C1016&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/06\/LDAP-DIT.jpg?fit=1200%2C1016&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/06\/LDAP-DIT.jpg?fit=1200%2C1016&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/06\/LDAP-DIT.jpg?fit=1200%2C1016&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":282,"url":"https:\/\/drfugazi.eu.org\/en\/przygotowanie-kontenera\/","url_meta":{"origin":338,"position":5},"title":"(Polski) Przygotowanie kontenera dla OpenDJ","author":"drfugazi","date":"Friday July  8th, 2011","format":false,"excerpt":"Przygotowanie kontenera (Solaris zone) dla serwera us\u0142ug katalogowych OpenDJ Uruchamiam format aby system wykry\u0142 dyski i pokaza\u0142 ich WWN: # format Searching for disks...done c4t600A0B80002ACF5A000015954E16BDE3d0: configured with capacity of 15.00GB c4t600A0B80002ACF5A000015974E16BE5Fd0: configured with capacity of 15.00GB c4t600A0B80002ACF5A000015994E16BEDBd0: configured with capacity of 15.00GB Tworz\u0119 zpool\u0119 raidz o nazwie zldapdj1, na kt\u00f3rej\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/338"}],"collection":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":0,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"wp:attachment":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}