目录服务问题 [英] directory service problem

查看:61
本文介绍了目录服务问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用(System.DirectoryServices)库在活动目录上执行操作,例如(在组织单位中创建用户,创建组织单位).在我的数据库中,有一个表,其中包含存在于其中的用户的安全标识符(SID) 活动目录,我正在使用此SID在表和活动目录之间执行数据同步,但是我有这个问题:当我使用CLR存储过程从另一台服务器(数据库服务器)连接到活动目录服务器时,删除用户并 之后,我尝试在活动目录中创建相同的用户,我得到了已删除的新用户的旧SID,例如:-创建具有帐户名(詹姆斯)的用户,并获取其数据时的SID是:S-1-5-21-3155200135-2363911474-781782287-1272 -当我删除此用户并创建具有相同名称(詹姆斯)的同一用户时,我得到的是旧SID:S-1-5-21-31551551351356396391-4474-781782287-1272但是奇怪的想法是当我转到活动目录服务器和预览用户数据我发现该SID 为用户提供的是另一个Sid(与S-1-5-21-3155155135135-6396394474-781782287-1272不同).当我在活动目录上测试相同的场景时(没有从另一台PC连接到它),一切正常,我得到了一个新的SID.

I am using (System.DirectoryServices) library to perform operations on active directory such as (create User in Organizational Unit, create Organizational Unit). In my database there is table contains Security Identifier (SID) For the User that exists in active directory, I am Using This SID to perform Data Synchronization between the table and active directory But I have this problem: When I connect to Active directory server from another server (database server) using a CLR stored procedure delete user And after that I try to create the same user in active directory, I get the Old SID For the New User that I already deleted, for Example: - When I create the User that has Account Name (james), and get it’s data the SID is : S-1-5-21-3155200135-2363911474-781782287-1272 - When I delete this User and create The same User with the same name (james), I get The Old SID : S-1-5-21-3155200135-2363911474-781782287-1272 But the strange idea is when I go to the Active directory server and preview the user data I found that the SID for the user is another Sid (different from S-1-5-21-3155200135-2363911474-781782287-1272). And when I test the same scenario on the active directory (without connecting to it form another PC) everything goes right and I get a new SID.

注意:在Active Directory 2012和2008上执行的所有操作都得到相同的结果

note:all the operations performed on Active directory 2012 and 2008 and i get the same results

请任何帮助

推荐答案

我只能推测您正在使用DirectoryEntry.您是否尝试过使用RefreshCache: http://msdn.microsoft.com/en-us/library/y73eyaya (v = vs.110).aspx  ?
I can only surmise that you are using DirectoryEntry.  Have you tried using RefreshCache: http://msdn.microsoft.com/en-us/library/y73eyaya(v=vs.110).aspx ?


这篇关于目录服务问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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