{"id":183996,"date":"2013-06-20T16:03:03","date_gmt":"2013-06-20T12:03:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=183996"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=183996","title":{"rendered":"<span class=\"post_title\">\u0410\u0434\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430 \u043d\u0430 OpenLDAP \u0434\u043b\u044f Outlook&#8217;\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u0438 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0440\u0443\u043a\u0430\u043c\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0441 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0438 \u044f\u0432\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 MS Outlook, The Bat, Mozilla Thunderbird, \u0438.\u0442\u0434<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u00ab\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a\u00bb \u0432 Oulook, \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0420\u0430\u0441\u043f\u0438\u043b\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 4 \u0447\u0430\u0441\u0442\u0438:  <\/p>\n<ul>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OpenLDAP<\/li>\n<li>\u0417\u0430\u0431\u0440\u0430\u0442\u044c XLS \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/li>\n<li>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c<\/li>\n<li>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0438\u0437 \u043a\u043d\u0438\u0433\u0438, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u043c\u043e\u0434\u0443\u043b\u0438<\/li>\n<\/ul>\n<h4>OpenLDAP<\/h4>\n<p>  \u0412\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0444\u0440\u0438\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Microsoft, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430 \u0432\u0441\u0435\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0435. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0433\u043e\u0440\u0430 \u043a \u041c\u0443\u0445\u0445\u0430\u043c\u0435\u0434\u0443 \u043d\u0435 \u0438\u0434\u0435\u0442, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0440\u0438\u0445\u0442\u043e\u0432\u0430\u0442\u044c OpenLDAP.<\/p>\n<p>  \u0421 \u043f\u0430\u0442\u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f Victor Sudakov <a href=\"http:\/\/victor-sudakov.livejournal.com\/124269.html\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0437\u0430 \u0447\u0442\u043e \u0435\u043c\u0443 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439, \u0441\u043a\u0430\u0436\u0435\u043c, \u0441 8Gb \u0434\u0438\u0441\u043a\u0430 \u0438 64Mb \u043f\u0430\u043c\u044f\u0442\u0438, \u0441\u0442\u043e\u0438\u0442 CSS \u2014 Calculate Linux Scratch(Gentoo, \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c), \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u0442\u0447 \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e.<\/p>\n<h4>\u041f\u0430\u0447\u0438\u043c<\/h4>\n<p>  \u041e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u0440\u043e\u0432\u0430\u0432\u044b\u043c \u043f\u0430\u0442\u0447\u0438\u043d\u0433\u043e\u043c \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043c\u043e\u044e \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0440\u0435\u043f\u0443 (\u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u044f \u0431\u0443\u0434\u0443 \u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c): \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c overlay \u0432 \/etc\/layman\/layman.cfg:<\/p>\n<pre><code class=\"bash\">overlays  : http:\/\/www.gentoo.org\/proj\/en\/overlays\/repositories.xml             https:\/\/raw.github.com\/arrrght\/openldap-outlook\/master\/overlay.xml <\/code><\/pre>\n<p>  \u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c:  <\/p>\n<pre><code># layman -S # layman -a openldap-outlook <\/code><\/pre>\n<p>  \u041f\u0438\u0448\u0435\u043c \u043a\u043b\u044e\u0447\u0438\u043a\u0438 \u0432 \/etc\/portage\/package.use:<br \/>  <code>net-nds\/openldap experimental icu slp perl overlays ms-sssvlv<\/code><\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c OpenLDAP  <\/p>\n<pre><code class=\"bash\">emerge openldap <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043b\u044e\u0431\u0438\u0442 \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438, \u0432\u043e\u0442 \u043f\u0430\u0442\u0447(\u0432\u0437\u044f\u0442 <a href=\"http:\/\/victor-sudakov.livejournal.com\/124269.html\">\u0437\u0434\u0435\u0441\u044c<\/a>):  <\/p>\n<pre><code class=\"diff\">--- .\/openldap-2.4.33\/servers\/slapd\/schema_prep.c.orig    2012-12-07 09:54:56.000000000 +0700 +++ .\/openldap-2.4.33\/servers\/slapd\/schema_prep.c    2012-12-07 09:58:10.000000000 +0700 @@ -908,6 +908,7 @@              &quot;DESC 'RFC4519: common supertype of name attributes' &quot;              &quot;EQUALITY caseIgnoreMatch &quot;              &quot;SUBSTR caseIgnoreSubstringsMatch &quot; +            &quot;ORDERING caseIgnoreOrderingMatch &quot;              &quot;SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )&quot;,              NULL, SLAP_AT_ABSTRACT,              NULL, NULL, <\/code><\/pre>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h4>\n<p>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u043e\u0442 <a href=\"http:\/\/sysadminblog.ru\/ldap\/2009\/10\/26\/pravilnaya-incializaciya-openldap-servera-s-dinamicheskoy-konfiguraciey.html\">\u0437\u0434\u0435\u0441\u044c <\/a> \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u0441\u0435\u0440\u044a\u0451\u0437\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f LDAP-\u043e\u043c. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0449\u0435 \u2014 \u043c\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043f\u043e \u0443\u043c\u043e\u0447\u0430\u043d\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/openldap\/slapd.conf. \u0412\u043e\u0442 \u043e\u043d, \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0431\u0435\u0437\u043e \u0432\u0441\u044f\u043a\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e:<\/p>\n<pre><code>include         \/etc\/openldap\/schema\/core.schema include         \/etc\/openldap\/schema\/cosine.schema include         \/etc\/openldap\/schema\/inetorgperson.schema include         \/etc\/openldap\/schema\/java.schema include         \/etc\/openldap\/schema\/openldap.schema include         \/etc\/openldap\/schema\/nis.schema include         \/etc\/openldap\/schema\/corba.schema include         \/etc\/openldap\/schema\/dyngroup.schema include         \/etc\/openldap\/schema\/misc.schema include         \/etc\/openldap\/schema\/pmi.schema  pidfile         \/var\/run\/openldap\/slapd.pid argsfile        \/var\/run\/openldap\/slapd.args  modulepath      \/usr\/lib64\/openldap\/openldap moduleload      back_passwd.so moduleload      back_ldap.so moduleload      sssvlv.so  database        hdb overlay         sssvlv suffix          &quot;dc=org,dc=com&quot; checkpoint      32      30 rootdn          &quot;cn=Manager,dc=org,dc=com&quot; rootpw          secret directory       \/var\/lib\/openldap-data index   objectClass     eq \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 LDAP \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0438\u0435\u043d\u0442 entry.ldif:  dn: dc=org,dc=com objectClass: dcObject objectClass: organization o: org.com&lt;\/code&gt;  \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 ldif \u0432 \u0431\u0430\u0437\u0443:  &lt;code&gt;slapadd &lt; entry.ldif&lt;\/code&gt; \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0438\u0435\u043d\u0442 LdapAdmin \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 ou=ab,dc=org,dc=com. \u0412\u043e\u0442, \u044d\u0442\u043e \u0442\u043e\u0447\u043a\u0430, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u044b.  &lt;h4&gt;XLS&lt;\/h4&gt; \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043a\u043e\u0439 smbget, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 samba, \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 xls2csv. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 getfile.sh:  &lt;source lang=&quot;bash&quot;&gt; #!\/bin\/sh SMBGET=\/usr\/bin\/smbget LDAPSEARCH=\/usr\/bin\/ldapsearch LDAPDELETE=\/usr\/bin\/ldapdelete  rm &quot;temp.xls&quot; ${SMBGET} &quot;smb:\/\/domain;user:password@192.168.1.1\/Share\/Telephones.xls&quot; -o temp.xls xls2csv -c~ -b\\' temp.xls &gt; temp.csv  # delete all from ou=ab,dc=org,dc=com  ${LDAPSEARCH} -b &quot;ou=ab,dc=org,dc=com&quot; &quot;(uid=*)&quot; | grep dn: | awk '{print $2}' | ${LDAPDELETE} -Dcn=Manager,dc=org,dc=com -wsecret <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u043b\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0438\u0439 csv \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 ldif \u0444\u0430\u0439\u043b, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439(\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0441\u043a\u043e\u0440\u0443\u044e \u0440\u0443\u043a\u0443):<\/p>\n<pre><code class=\"perl\">#!\/usr\/bin\/perl use strict; use encoding 'utf8';  open my $fh, &quot;&lt;temp.csv&quot; or die 'Can\\'t open file'; open my $fout, &quot;&gt;temp.ldif&quot; or die 'Can\\'t write to file';  my $org = ''; my $orgNum = 0; my $div = ''; my $userNum = 1000; my $ouDcDc = 'ou=ab,dc=org,dc=com';  while (my $line = &lt;$fh&gt;) {         my $isNowOrg = 0;         my $email = '';          chomp $line;         my @f = split \/~\/, $line;          if (!$org || $f[0]=~\/\\'\/){                 $org = clean($f[0]);                 $org =~s\/^(.+)\\&quot;(.+)\\&quot;$\/$2\/;                 $org = firstUp($org);                 $isNowOrg = 1;                 $orgNum++;         }          $email = clean($f[5]) if $f[5]=~\/@\/;         $div = firstUp(clean($f[0])) unless $f[1] || $email;          my $name = clean($f[1]);         my $post = clean($f[0]);          my $telNum = clean($f[4]);         $telNum =clean($f[2]) if $orgNum==3;         $telNum =~s\/\\D\/ \/g;         $telNum =~s\/^\\D*\/\/g;         #print &quot;#$telNum#\\n&quot;;         #$telNum = ~s\/\\W\/\/g;          my %names = givenName($name);         if ($name && $post && $names{'firstName'}){                 ++$userNum;                 print $fout &quot;dn: uid=user${userNum},${ouDcDc}\\n&quot;;                 print $fout &quot;uid: user${userNum}\\n&quot;;                 print $fout &quot;objectClass: posixAccount\\nobjectClass: top\\nobjectClass: inetOrgPerson\\ngidNumber: 1000\\n&quot;;                 print $fout &quot;uidNumber: ${userNum}\\n&quot;;                 print $fout &quot;givenName: &quot;, $names{'firstName'}, &quot;\\n&quot;;                 print $fout &quot;initials: &quot;, $names{'middleName'}, &quot;\\n&quot;;                 print $fout &quot;sn: &quot;, $names{'lastName'}, &quot;\\n&quot;;                 #print $fout &quot;username: user${userNum}\\n&quot;;                 print $fout &quot;homeDirectory: home_dir\\ngecos: gecos\\nloginShell: log_shell\\n&quot;;                 print $fout &quot;telephoneNumber: ${telNum}\\n&quot; if $telNum;                 print $fout &quot;physicalDeliveryOfficeName: ${div}\\n&quot;;                 print $fout &quot;ou: ${div}\\n&quot;;                 print $fout &quot;o: $org\\n&quot;;                 #print $fout &quot;organizationName: ACME\\n&quot;;                 print $fout &quot;title: $post\\n&quot;;                 print $fout &quot;mail: $email\\n&quot;;                 print $fout &quot;cn: &quot;, $names{'shortName'},&quot;\\n&quot;;                 print $fout &quot;\\n&quot;;         #       print &quot;ORG: $org, DIV: $div, POST: $post, NAME: $name, EMAIL: $email\\n&quot;;         } } close $fout; close $fh;  sub givenName(){         my $name = shift;         my @s=[];         my %names = {};         @s = split ' ', $name;         $names{'firstName'} = $s[1];         $names{'lastName'} = $s[0];         $names{'middleName'} = $s[2];         $names{'shortName'} = $s[0] .' '. substr($s[1],0,1) .'.'. substr($s[2],0,1) .'.';         return %names; }  sub clean(){         my $name = shift;         $name =~s\/^\\'\/\/;         $name =~s\/\\&quot;\\&quot;\/\\&quot;\/g;         $name =~s\/^\\&quot;\/\/;         $name =~s\/\\&quot;$\/\/;         $name =~s\/\\ *$\/\/g;         $name =~s\/\\ +\/\\ \/g;         return $name; }  sub firstUp(){         my $name = shift;         $name = lc($name);         return ucfirst($name); }  <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b temp.ldif, \u0443\u0436\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043a\u0430\u0440\u043c\u0438\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0435<\/p>\n<pre><code class=\"bash\">ldapadd -v -Dcn=Manager,dc=org,dc=com -wsecret &lt; .\/temp.ldif <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e. \u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0432 Outlook, \u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<pre><code>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 --&gt;   \u0410\u0434\u0440\u0435\u0441\u043d\u044b\u0435 \u043a\u043d\u0438\u0433\u0438 --&gt;   \u0421\u043e\u0437\u0434\u0430\u0442\u044c --&gt;     LDAP--&gt;     IP: \u043d\u0430\u0448 IP       \u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0445\u043e\u0434 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440       \u0414\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 --&gt;         \u041f\u043e\u0438\u0441\u043a --&gt;           \u0411\u0430\u0437\u0430 \u043f\u043e\u0438\u0441\u043a\u0430: ou=ab,dc=org,dc=com           \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440: \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 (\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430) <\/code><\/pre>\n<p>  \u0412\u0441\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u0440\u043e\u043d, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c.<br \/>  PS: \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 Oulook, \u043d\u0430\u0434\u043e \u043e\u0442\u043f\u0430\u0442\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b \/etc\/openldap\/schema\/core.schema: \u0414\u043e\u0431\u0430\u0432\u0438\u043c &#8216;company&#8217; \u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e Microsoft, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c o, \u0441\u0442\u0440\u043e\u043a\u0430 120  <\/p>\n<pre><code>attributetype ( 2.5.4.10 NAME ( 'company' 'o' 'organizationName' )         DESC 'RFC2256: organization this object belongs to'         SUP name ) <\/code><\/pre>\n<p>  ** \u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u0441 \u043c\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 <a href=\"http:\/\/a3r.me\/posts\/openldap-outlook.html\">a3r.me\/posts\/openldap-outlook.html<\/a> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/183996\/\"> http:\/\/habrahabr.ru\/post\/183996\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u0438 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0440\u0443\u043a\u0430\u043c\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0441 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0438 \u044f\u0432\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 MS Outlook, The Bat, Mozilla Thunderbird, \u0438.\u0442\u0434<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u00ab\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a\u00bb \u0432 Oulook, \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-183996","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/183996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=183996"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/183996\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=183996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=183996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=183996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}