Guest User

active directory otrs config

a guest
Feb 22nd, 2011
1,693
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.71 KB | None | 0 0
  1. # --
  2. # Kernel/Config.pm - Config file for OTRS kernel
  3. # Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
  4. # --
  5. # $Id: Config.pm.dist,v 1.23 2010/01/13 22:25:00 martin Exp $
  6. # --
  7. # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  8. # the enclosed file COPYING for license information (AGPL). If you
  9. # did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
  10. # --
  11. # Note:
  12. #
  13. # -->> OTRS does have a lot of config settings. For more settings
  14. # (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
  15. # LDAP, PostMaster, Session, Preferences, ...) see
  16. # Kernel/Config/Defaults.pm and copy your wanted lines into "this"
  17. # config file. This file will not be changed on update!
  18. #
  19. # --
  20.  
  21. package Kernel::Config;
  22.  
  23. sub Load {
  24. my $Self = shift;
  25. # ---------------------------------------------------- #
  26. # ---------------------------------------------------- #
  27. # #
  28. # Start of your own config options!!! #
  29. # #
  30. # ---------------------------------------------------- #
  31. # ---------------------------------------------------- #
  32.  
  33. # ---------------------------------------------------- #
  34. # database settings #
  35. # ---------------------------------------------------- #
  36. # DatabaseHost
  37. # (The database host.)
  38. $Self->{'DatabaseHost'} = 'localhost';
  39. # Database
  40. # (The database name.)
  41. $Self->{'Database'} = 'otrs';
  42. # DatabaseUser
  43. # (The database user.)
  44. $Self->{'DatabaseUser'} = 'otrs';
  45. # DatabasePw
  46. # (The password of database user. You also can use bin/otrs.CryptPassword.pl
  47. # for crypted passwords.)
  48. $Self->{'DatabasePw'} = 'hot';
  49. # DatabaseDSN
  50. # (The database DSN for MySQL ==> more: "man DBD::mysql")
  51. $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
  52. $Self->{'Ticket::Responsible'} = '1';
  53. # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
  54. # if you want to use a local socket connection
  55. # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
  56. # if you want to use a tcpip connection
  57. # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
  58.  
  59. #------------------------------------------------------------------------
  60.  
  61.  
  62. #Enable LDAP authentication for Customers / Users
  63. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  64. $Self->{'Customer::AuthModule::LDAP::Host'} = '192.28.2.20';
  65. $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'OU=Kunder,DC=test,DC=local';
  66. $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
  67.  
  68. #The following is valid but would only be necessary if the
  69. #anonymous user do NOT have permission to read from the LDAP tree
  70. $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=otrs,CN=Users,DC=test,DC=local';
  71. $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'Kebab';
  72.  
  73. #CustomerUser
  74. #(customer user database backend and settings)
  75. $Self->{CustomerUser} = {
  76. Module => 'Kernel::System::CustomerUser::LDAP',
  77. Params => {
  78. host => '192.28.2.20',
  79. BaseDN => 'OU=Users,OU=Kunder,DC=test,DC=local',
  80. SSCOPE => 'sub',
  81. UserDN =>'CN=otrs,CN=Users,DC=test,DC=local',
  82. UserPw => 'Kebab',
  83. },
  84. # customer unique id
  85. CustomerKey => 'sAMAccountName',
  86. # customer #
  87. CustomerID => 'company',
  88. CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
  89. CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
  90. CustomerUserSearchPrefix => '',
  91. CustomerUserSearchSuffix => '*',
  92. CustomerUserSearchListLimit => 250,
  93. CustomerUserPostMasterSearchFields => ['mail'],
  94. CustomerUserNameFields => ['givenname', 'sn'],
  95. Map => [
  96. # note: Login, Email and CustomerID needed!
  97. # var, frontend, storage, shown, required, storage-type
  98. #[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
  99. [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
  100. [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
  101. [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
  102. [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
  103. [ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var' ],
  104. [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
  105. #[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
  106. #[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
  107. ],
  108. };
  109.  
  110. #Add the following lines when only users are allowed to login if they reside in the spicified security group
  111. #Remove these lines if you want to provide login to all users specified in the User Base DN
  112. #example: $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=BaseOU, dc=example, dc=com';
  113. # $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'CN=otrs_ldap_allow_C,OU=Groups,OU=BaseOU,DC=example,DC=com';
  114. #$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
  115. #$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN'
  116.  
  117.  
  118.  
  119.  
  120.  
  121. # ---------------------------------------------------- #
  122. # fs root directory
  123. # ---------------------------------------------------- #
  124. $Self->{Home} = '/opt/otrs';
  125.  
  126. # ---------------------------------------------------- #
  127. # insert your own config settings "here" #
  128. # config settings taken from Kernel/Config/Defaults.pm #
  129. # ---------------------------------------------------- #
  130. # $Self->{SessionUseCookie} = 0;
  131. # $Self->{CheckMXRecord} = 0;
  132.  
  133. # ---------------------------------------------------- #
  134.  
  135. # ---------------------------------------------------- #
  136. # data inserted by installer #
  137. # ---------------------------------------------------- #
  138. # $DIBI$
  139. $Self->{'DefaultCharset'} = 'utf-8';
  140.  
  141. # ---------------------------------------------------- #
  142. # ---------------------------------------------------- #
  143. # #
  144. # End of your own config options!!! #
  145. # #
  146. # ---------------------------------------------------- #
  147. # ---------------------------------------------------- #
  148. }
  149.  
  150. # ---------------------------------------------------- #
  151. # needed system stuff (don't edit this) #
  152. # ---------------------------------------------------- #
  153. use strict;
  154. use warnings;
  155.  
  156. use vars qw(@ISA $VERSION);
  157. $VERSION = qw($Revision: 1.23 $)[1];
  158.  
  159. use Kernel::Config::Defaults;
  160. push (@ISA, 'Kernel::Config::Defaults');
  161.  
  162. # -----------------------------------------------------#
  163.  
  164. 1;
Advertisement
Add Comment
Please, Sign In to add comment