habrahabr

vi /opt/otrs/Kernel/Config.pm

Jul 12th, 2011
18,194
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Kernel::Config;
  2.  
  3. sub Load {
  4. my $Self = shift;
  5. $Self->{'DatabaseHost'} = 'localhost';
  6. $Self->{'Database'} = 'otrs';
  7. $Self->{'DatabaseUser'} = 'otrs';
  8. $Self->{'DatabasePw'} = 'hot';
  9. $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
  10. $Self->{Home} = '/opt/otrs';
  11. $Self->{'DefaultCharset'} = 'utf-8';
  12.  
  13. # Enable LDAP Authentication Sync for Agent #
  14. $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
  15. $Self->{'AuthSyncModule::LDAP::Host'} = 'pdczavod.moizavod.local';
  16. $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'ou=Admins,dc=moizavod,dc=local';
  17. $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
  18. $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
  19. $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=rasa,OU=Users,OU=russia,DC=moizavod,DC=local';
  20. $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'pk4rtfgv2sd';
  21. # Enable Agent Mapping from LDAP to DB #
  22. $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
  23. UserFirstname => 'givenName',
  24. UserLastname => 'sn',
  25. UserEmail => 'mail',
  26. };
  27.  
  28. $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
  29. 'users',
  30. ];
  31. $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
  32. $Self->{'AuthModule::LDAP::Host'} = 'pdczavod.moizavod.local';
  33. $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=moizavod, dc=local';
  34. $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
  35. $Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=rasa,OU=Users,OU=russia,DC=moizavod,DC=local';
  36. $Self->{'AuthModule::LDAP::SearchUserPw'} = 'pk4rtfgv2sd';
  37. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  38. $Self->{'Customer::AuthModule::LDAP::Host'} ='pdczavod.moizavod.local';
  39. $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=moizavod, dc=local';
  40. $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
  41. $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=rasa,OU=Users,OU=russia,DC=moizavod,DC=local';
  42. $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'pk4rtfgv2sd';
  43. $Self->{CustomerUser} = {
  44. Module => 'Kernel::System::CustomerUser::LDAP',
  45. Params => {
  46. Host => 'pdczavod.moizavod.local',
  47. BaseDN => 'dc=moizavod, dc=local',
  48. SSCOPE => 'sub',
  49. UserDN => 'СN=rasa,OU=Users,OU=russia,DC=moizavod,DC=local',
  50. UserPw => 'pk4rtfgv2sd',
  51. },
  52. CustomerKey => 'sAMAccountName',
  53. CustomerID => 'mail',
  54. CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
  55. CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
  56. CustomerUserPostMasterSearchFields => ['mail'],
  57. CustomerUserNameFields => ['givenname', 'sn'],
  58. Map => [
  59. [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
  60. [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
  61. [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
  62. [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
  63. [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
  64. ],
  65. };
  66. }
  67.  
  68. # ---------------------------------------------------- #
  69. # needed system stuff (don't edit this) #
  70. # ---------------------------------------------------- #
  71. use strict;
  72. use warnings;
  73. use vars qw(@ISA $VERSION);
  74. $VERSION = qw($Revision: 1.23 $)[1];
  75.  
  76. use Kernel::Config::Defaults;
  77. push (@ISA, 'Kernel::Config::Defaults');
  78.  
  79. 1;
RAW Paste Data