AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1429567
Accepted
Henrique
Henrique
Asked: 2019-04-26 05:07:36 +0800 CST2019-04-26 05:07:36 +0800 CST 2019-04-26 05:07:36 +0800 CST

OTRS 6 - AD 集成 - 域管理员用户映射为代理,而不是 OTRS 管理员

  • 772

我正在使用 ITSM 模块测试 OTRS 6。现在我只是在我们的 DEV 环境中测试它,所以如果这是最简单的方法,那么放弃一切并从头开始并不是问题。我打算尽快将其投入生产。

我使用官方文档“按书”安装了它,它就像一个魅力!它已安装在 Ubuntu Server 18.04 LTS 上。我让所有用户使用 MySQL 上的用户数据库在本地进行身份验证。我让客户、代理和管理员都能够进行身份验证并显示正确的用户面板。

在那之后,我已经能够成功地将 OTRS 与我的 AD 集成,但有一个问题:我所有的 AD 用户都被映射为客户,我所有的域管理员(也属于 OTRS_Admins AD 组)都是代理,并且...... . 我没有帐户来管理 OTRS。根本没有管理员。

我应该怎么办?如何将我的域管理员映射为 OTRS 管理员而不是代理?如何将我的一些域用户映射为代理?难道我做错了什么?我完全迷路了。

官方文档帮助不大,我无法在 Google 上找到任何有我特定需求的人。

我的(编辑过的)Config.pm:

     $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';


        ### OTRS Admin Auth
        ### 
        $Self->{'AuthModule::LDAP::Host'} = '192.168.179.2';     # AD Server
        $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=test,DC=local'; # Domain
        $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
        $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=OTRS_Admins,CN=Users,DC=test,DC=local';   #OTRS Admin group
        $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
        $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
        $Self->{'AuthModule::LDAP::SearchUserDN'} = 'svc_otrs'; #OTRS service user
        $Self->{'AuthModule::LDAP::SearchUserPw'} = 'Passw0rd'; #And its passwird
        $Self->{'AuthModule::LDAP::AlwaysFilter'} = '';
        $Self->{'AuthModule::LDAP::Params'} = {
                          port => 389,
                          timeout => 120,
                          async => 0,
                          version => 3,
                          sscope => 'sub'
                        };

        ### User Sync
        ### AD <==> DB OTRS (MySQL)
        $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
        $Self->{'AuthSyncModule::LDAP::Host'} = '192.168.179.2';      # AD SRV
        $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=test,DC=local'; # Domain
        $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
        $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'svc_otrs';         
        $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Passw0rd';    
        $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
        # DB -> LDAP
        UserFirstname => 'givenName',
        UserLastname => 'sn',
        UserEmail => 'mail',
        };

        $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
        'users', 'basic_admin',
        ];
  $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
    $Self->{'Customer::AuthModule::LDAP::Host'} = '192.168.179.2';
    $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=test,DC=local';    
    $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'svc_otrs';     
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'Passw0rd';     
    $Self->{CustomerUser} = {
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
    Host => '192.168.179.2',     # AD Server
    BaseDN => 'dc=test,DC=local',      #Domain
    SSCOPE => 'sub',
    UserDN =>'svc_otrs',     #OTRS Service User
    UserPw => 'Passw0rd',    #its password
    AlwaysFilter => '(&(samAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',
    SourceCharset => 'utf-8',
    DestCharset => 'utf-8',
    },

    CustomerKey => 'sAMAccountName',
    CustomerID => 'mail',
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 10000,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [
    # note: Login, Email and CustomerID needed!
    #[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
    [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
    #[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
    #[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
    };
active-directory
  • 1 1 个回答
  • 827 Views

1 个回答

  • Voted
  1. Best Answer
    Henrique
    2019-05-28T14:54:48+08:002019-05-28T14:54:48+08:00

    事实上,这是一个由三部分组成的问题:

    1. 当我使用 LDAP 后端时,我从数据库后端丢失了我的用户(包括 root@localhost 超级用户)
    2. 来自 LDAP 后端的代理用户没有管理员权限
    3. OTRS 文档在这里和那里有点过时

    问题 1:丢失了我的数据库后端 在Config.pm中,我插入了以下行来选择代理后端:

    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';

    好吧,这一行的作用是覆盖系统中其他地方的原始后端选择器。因此,为了拥有 DB 后端管理员用户和 LDAP 代理用户,您应该使用 OTRS 自己的(和记录的!)方式来拥有多个后端,即在模块实例上附加一个数字后缀(请注意 de 1紧随其后AuthModule):

    $Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP';

    当然,您必须将数字放在所有模块的属性中:

    $Self->{'AuthModule::LDAP::Host1'} = '192.168.xx.xx';    
    $Self->{'AuthModule::LDAP::BaseDN1'} = 'dc=test,DC=local'; 
    $Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName';
    $Self->{'AuthModule::LDAP::GroupDN1'} = CN=GS_OTRS_Agents,CN=Users,DC=test,DC=local';
    $Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
    $Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
    $Self->{'AuthModule::LDAP::SearchUserDN1'} = 'OTRS';    #OTRS LDAP User
    $Self->{'AuthModule::LDAP::SearchUserPw1'} = 'somepass'; #Password for the LDAP User
    $Self->{'AuthModule::LDAP::AlwaysFilter1'} = '';
    $Self->{'AuthModule::LDAP::Params1'} = {
                      port => 389,
                      timeout => 120,
                      async => 0,
                      version => 3,
                      sscope => 'sub'
                    };    
    

    (将此与上面发布的代码进行比较,在原始问题上。)

    公平地说,OTRS 管理手册中有一节解释了如何更改后端,以及如何拥有多个后端。但是缺少有关如果您使用$Self->{'AuthModule'}而不是$Self->{'AuthModule1'}将覆盖本机数据库后端而不是同时运行两者的信息。花了很多死脑筋来弄清楚这一点。

    这解决了失去我的管理员用户的问题,他们都在原来的数据库后端。所有 LDAP 代理都不是完全管理员,因此他们可以回答工单但不能以管理员身份管理 OTRS 系统。有了这个,我就有了两种用户。

    这就引出了第二个问题。

    问题 2:来自 LDAP 后端的代理用户没有管理员权限

    我的意思是,我必须能够在我的 AD 上创建一个代理用户,他/她也应该能够成为管理员。他们是!

    `$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
    'users',
    ];`
    

    如果我不只是“用户”,还把“basic_admin”放在该列表中,那么我所有的初始代理也将是管理员。我可以稍后撤销他们的管理员权限,但由于问题 1,我被锁定在没有管理员用户的 OTRS 之外,我无法授予或撤销任何管理员权限。

    毕竟,我选择保留它,并将我的代理创建为用户,因为我已经将我原来的 root@localhost 用户作为管理员(因为我已经解决了问题 1),并将手动授予所有管理员权限我未来的管理员。但这是 OTRS 管理手册中另一个没有很好记录的细节。

    问题 3:OTRS 管理手册未完全更新

    我知道,对于所有 OpenSource 项目,这种情况时有发生。但是,到处都有一些由于误导性信息而导致的陷阱,这些陷阱继承自未更新的早期 OTRS 版本。例如,有一些属性在手册中提到但对版本 6 无效。

    我偶然发现了一个适用于版本 5 并且没有从版本 6 中清除的版本。我的意思是,属性的​​ QuickRef 页面的链接已被删除,因为该页面 - 和属性 - 不再存在,但它仍然在其他地方提到在手册中,关于重要的配置部分。

    • 0

相关问题

  • 将 2003(!) 域控制器替换为 2019

  • 外部用户需要访问我们的域

  • 如何设计Samba AD-DC网络(NAT/DHCP/DNS/VPN)

  • 重新加入 Active Directory 但没有数据恢复只是共享文件夹

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    Windows 10 服务称为 AarSvc_70f961。它是什么,我该如何禁用它?

    • 2 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Marko Smith

    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1056)

    • 4 个回答
  • Marko Smith

    我如何知道 Windows 安装在哪个驱动器上?

    • 6 个回答
  • Martin Hope
    Albin 支持结束后如何激活 WindowsXP? 2019-11-18 03:50:17 +0800 CST
  • Martin Hope
    fixer1234 “HTTPS Everywhere”仍然相关吗? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    Kagaratsch Windows 10 删除大量小文件的速度非常慢。有什么办法可以加快速度吗? 2019-09-23 06:05:43 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    Inter Sys Ctrl+C 和 Ctrl+V 是如何工作的? 2019-05-15 02:51:21 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve