Your IP : 172.28.240.42


Current Path : /var/www/html/clients/wiki.e-nk.ru/data/cache/0/
Upload File :
Current File : /var/www/html/clients/wiki.e-nk.ru/data/cache/0/033b8dc6dd7991f210618a2ddf1910cb.xhtml

<h3 class="sectionedit1" id="связка_otrs_33_и_active_directory">Связка OTRS 3.3 и Active Directory</h3>
<div class="level3">
<pre class="code">package Kernel::Config;

use strict;
use warnings;
use utf8;

sub Load {
    my $Self = shift;

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #

    # The database host
    $Self-&gt;{DatabaseHost} = &#039;127.0.0.1&#039;;

    # The database name
    $Self-&gt;{Database} = &#039;otrs&#039;;

    # The database user
    $Self-&gt;{DatabaseUser} = &#039;otrs&#039;;

    # The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords
    $Self-&gt;{DatabasePw} = &#039;,r9,7t4_chEtCVM&#039;;
        $Self-&gt;{SecureMode}=1;
        $Self-&gt;{&quot;Package::Timeout&quot;}=120;
        $Self-&gt;{&#039;SystemID&#039;}=35;
        $Self-&gt;{&#039;SessionName&#039;}=&#039;OTRSAgentInterface&#039;;
### MARKER ###


    # The database DSN for MySQL ==&gt; more: &quot;perldoc DBD::mysql&quot;
    $Self-&gt;{DatabaseDSN} = &quot;DBI:Pg:dbname=$Self-&gt;{Database};host=$Self-&gt;{DatabaseHost};&quot;;

    # The database DSN for PostgreSQL ==&gt; more: &quot;perldoc DBD::Pg&quot;
    # if you want to use a local socket connection
#    $Self-&gt;{DatabaseDSN} = &quot;DBI:Pg:dbname=$Self-&gt;{Database};&quot;;
    # if you want to use a TCP/IP connection
#    $Self-&gt;{DatabaseDSN} = &quot;DBI:Pg:dbname=$Self-&gt;{Database};host=$Self-&gt;{DatabaseHost};&quot;;
    # if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
#    $Self-&gt;{DatabasePostgresqlBefore82} = 1;

    # The database DSN for Microsoft SQL Server - only supported if OTRS is
    # installed on Windows as well
#    $Self-&gt;{DatabaseDSN} = &quot;DBI:ODBC:driver={SQL Server};Database=$Self-&gt;{Database};Server=$Self-&gt;{DatabaseHost},1433&quot;;

    # The database DSN for Oracle ==&gt; more: &quot;perldoc DBD::oracle&quot;
#    $ENV{ORACLE_HOME} = &#039;/u01/app/oracle/product/10.2.0/client_1&#039;;
#    $ENV{NLS_DATE_FORMAT} = &#039;YYYY-MM-DD HH24:MI:SS&#039;;
#    $ENV{NLS_LANG} = &quot;american_america.utf8&quot;;

#    $Self-&gt;{DatabaseDSN} = &quot;DBI:Oracle:sid=OTRS;host=$Self-&gt;{DatabaseHost};port=1522;&quot;;

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self-&gt;{Home} = &#039;/opt/otrs&#039;;
    $Self-&gt;{&#039;DefaultCharset&#039;} = &#039;UTF-8&#039;;

    # ---------------------------------------------------- #
    # insert your own config settings &quot;here&quot;               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self-&gt;{SessionUseCookie} = 0;
    # $Self-&gt;{CheckMXRecord} = 0;

    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$


    $Self-&gt;{&#039;AuthModule&#039;} = &#039;Kernel::System::Auth::LDAP&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::Host&#039;} = &#039;adns2.prettl.loc&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::BaseDN&#039;} = &#039;dc=prettl, dc=loc&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::UID&#039;} = &#039;sAMAccountName&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::SearchUserDN&#039;} = &#039;CN=OTRS System,OU=Отдел ИТ,OU=Nizhnekamsk,DC=prettl,DC=loc&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::SearchUserPw&#039;} = &#039;tia18ciler&#039;;
    # $Self-&gt;{&#039;AuthModule::LDAP::UserAttr&#039;} = &#039;userPrincipalName&#039;;
    # for non ldap posixGroups objectclass (with full user dn)
    $Self-&gt;{&#039;AuthModule::LDAP::GroupDN&#039;} = &#039;CN=it,OU=Groups,DC=prettl,DC=loc&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::AccessAttr&#039;} = &#039;member&#039;;
    $Self-&gt;{&#039;AuthModule::LDAP::UserAttr&#039;} = &#039;DN&#039;;

    $Self-&gt;{&#039;AuthModule::LDAP::AlwaysFilter&#039;} = &#039;(objectclass=user)&#039;;

    # параметры соединения, чаще всего их даже не требуется указывать
    $Self-&gt;{&#039;AuthModule::LDAP::Params&#039;} = {
    port =&gt; 389,
    timeout =&gt; 120,
    async =&gt; 0,
    version =&gt; 3,
    };


    # Enable LDAP Authentication Sync for Agent #
    $Self-&gt;{&#039;AuthSyncModule&#039;} = &#039;Kernel::System::Auth::Sync::LDAP&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::Host&#039;} = &#039;ldap://adns2.prettl.loc/&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::BaseDN&#039;} = &#039;DC=prettl,DC=loc&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::UID&#039;} = &#039;sAMAccountName&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::AccessAttr&#039;} = &#039;member&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::UserAttr&#039;} = &#039;DN&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::SearchUserDN&#039;} = &#039;CN=OTRS System,OU=Отдел ИТ,OU=Nizhnekamsk,DC=prettl,DC=loc&#039;;
    $Self-&gt;{&#039;AuthSyncModule::LDAP::SearchUserPw&#039;} = &#039;tia18ciler&#039;;
    # Enable Agent Mapping from LDAP to DB #
    $Self-&gt;{&#039;AuthSyncModule::LDAP::UserSyncMap&#039;} = {
    UserFirstname =&gt; &#039;givenName&#039;,
    UserLastname =&gt; &#039;sn&#039;,
    UserEmail =&gt; &#039;mail&#039;,
    };

    $Self-&gt;{&#039;AuthSyncModule::LDAP::UserSyncInitialGroups&#039;} = [
        &#039;users&#039;,
    ];


    $Self-&gt;{&#039;Customer::AuthModule&#039;} = &#039;Kernel::System::CustomerAuth::LDAP&#039;;
    $Self-&gt;{&#039;Customer::AuthModule::LDAP::Host&#039;} =&#039;adns2.prettl.loc&#039;;
    $Self-&gt;{&#039;Customer::AuthModule::LDAP::BaseDN&#039;} = &#039;dc=prettl, dc=loc&#039;;
    $Self-&gt;{&#039;Customer::AuthModule::LDAP::UID&#039;} = &#039;sAMAccountName&#039;;
    $Self-&gt;{&#039;Customer::AuthModule::LDAP::SearchUserDN&#039;} = &#039;CN=OTRS System,OU=Отдел ИТ,OU=Nizhnekamsk,DC=prettl,DC=loc&#039;;
    $Self-&gt;{&#039;Customer::AuthModule::LDAP::SearchUserPw&#039;} = &#039;tia18ciler&#039;;
    $Self-&gt;{CustomerUser} = {
     Module =&gt; &#039;Kernel::System::CustomerUser::LDAP&#039;,
     Params =&gt; {
     AlwaysFilter =&gt; &#039;(objectclass=user)&#039;,
            # if both your frontend and your LDAP are unicode, use this:
            SourceCharset =&gt; &#039;utf-8&#039;,
            DestCharset   =&gt; &#039;utf-8&#039;,

      Host =&gt; &#039;adns2.prettl.loc&#039;,
      BaseDN =&gt; &#039;dc=prettl, dc=loc&#039;,
      SSCOPE =&gt; &#039;sub&#039;,
      UserDN =&gt; &#039;CN=OTRS System,OU=Отдел ИТ,OU=Nizhnekamsk,DC=prettl,DC=loc&#039;,
      UserPw =&gt; &#039;tia18ciler&#039;,
    },
    CustomerKey =&gt; &#039;sAMAccountName&#039;,
    CustomerID =&gt; &#039;givenname&#039;,
    CustomerUserListFields =&gt; [&#039;sAMAccountName&#039;, &#039;cn&#039;, &#039;mail&#039;],
    CustomerUserSearchFields =&gt; [&#039;sAMAccountName&#039;, &#039;cn&#039;, &#039;mail&#039;],
    CustomerUserPostMasterSearchFields =&gt; [&#039;mail&#039;],
    CustomerUserNameFields =&gt; [&#039;givenname&#039;, &#039;sn&#039;],
    CustomerUserSearchListLimit =&gt; 400,
    Map =&gt; [
      [ &#039;UserFirstname&#039;, &#039;Firstname&#039;, &#039;givenname&#039;, 1, 1, &#039;var&#039; ],
      [ &#039;UserLastname&#039;, &#039;Lastname&#039;, &#039;sn&#039;, 1, 1, &#039;var&#039; ],
      [ &#039;UserLogin&#039;, &#039;Login&#039;, &#039;sAMAccountName&#039;, 1, 1, &#039;var&#039; ],
      [ &#039;UserEmail&#039;, &#039;Email&#039;, &#039;mail&#039;, 1, 1, &#039;var&#039; ],
      [ &#039;UserCustomerID&#039;, &#039;CustomerID&#039;, &#039;givenname&#039;, 0, 1, &#039;var&#039; ],
    ],
  };
}

    # ----------------------------------------------------
    # end of your own config options!!!                    #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #


# ---------------------------------------------------- #
# needed system stuff (don&#039;t edit this)                #
# ---------------------------------------------------- #

use base qw(Kernel::Config::Defaults);

# -----------------------------------------------------#

1;</pre>

</div>