在组织单位PL/SQL中搜索活动目录组织单位 [英] Search active directory organizational unit within an organizational unit PL/SQL

查看:60
本文介绍了在组织单位PL/SQL中搜索活动目录组织单位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我对此事进行了一些研究,但找不到真正的答案:该公司需要将用户表与活动目录同步.我们正在使用来自Oracle数据库的LDAP连接到AD.好的,起初听起来并不难,但随后研究广告的组织方式却变得很复杂.结构如下:

Hi I''ve done some research on this matter but can''t find a real answer for this: The company needs to sync a user table with the active directory. We are using LDAP from a Oracle database to connect to the AD. Ok at first didn''t sound hard BUT then researching how the Ad was organized it got complicated. The structure is at follows:

Active Directory Users and Computers
   +Saved Queries
   -Company.org
      -OrganizationalUnit(root this is where we start)
          -OU folder Regions
             +OU folder Computers
             -OU folder Users
                +Users we need
      +Other Stuff


问题是子树在组织单位上嵌套,而子树在组织单位上划分.我尝试了不同的方法,据我所知,是列出OU用户名,而不是用户,并列出区域的OU.只需在正确的方向上指向一个点即可.


The problem is the subtree its divided on Organizational units nested on organizational units. I''ve tried different approaches and as far as I have got is to list the OU Users Names, NOT the users instead, and list the OU of regions too. Just need a point in the right directions.

推荐答案

好,我解决了我的问题,
Ok i solved my issue,
Active Directory Users and Computers  
   +Saved Queries
   -Company.org
      -OrganizationalUnit <-----Starting Position
          -OU folder Regions
             +OU folder Computers
             -OU folder Users
                +Users we need
      +Other Stuff



显然,使用DBMS_LDAP.SCOPE_SUBTREE可以让我浏览我所有的开始位置以及中间位置.只需调整过滤器以提供给用户,它的最终形式是:



Aparently using the DBMS_LDAP.SCOPE_SUBTREE it let me browse through all my starting position and all in between. Just had to tweak the filter to provide the users, its final form was:

(&(&(objectCategory=user)(objectClass=user)(memberOf=*)(samaccountname=''||LDAP_USER||'')))


最后,我得到了PL/SQL过程,该过程搜索Active Directory并使用有效的AD电子邮件更新users表:)


Finally i got PL/SQL procedure that searches the Active Directory and updates the users table with a valid AD email :)


这篇关于在组织单位PL/SQL中搜索活动目录组织单位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆