简体   繁体   English

活动目录-Windows Server 2008 R2中的ldap属性createTimeStamp

[英]Active directory - ldap attribute createTimeStamp in Windows Server 2008 R2

To check how many users were created in the past one year for a particular domain I queried like the following, 要检查在过去一年中为以下查询的特定域创建了多少用户,

(&(objectCategory=person)(objectClass=user)(!(sAMAccountType=805306370))(createTimeStamp>=20090831022227.0Z))

I have two domain controllers, DC-1 is Windows Server 2008 and DC-2 is Windows Server 2008 R2 and this query works fine with the 2008 Server & I found that there were 1500 new users in the last year, but 2008 R2 Server gives only 64 users. 我有两个域控制器,DC-1是Windows Server 2008,DC-2是Windows Server 2008 R2,该查询在2008 Server上运行良好,我发现去年有1500个新用户,但是2008 R2 Server可以提供只有64位用户。 I have made the search for domain level & different OU levels and there is no change in the result count(64) but the users were different. 我已经搜索了域级别和不同的OU级别,结果计数(64)没有变化,但是用户有所不同。 I have also checked with other Domain DC's and for all other servers it works fine and another 2008 R2 Server alone gave the same result count, 64. I have also confirmed that this is not a replication issue. 我还与其他Domain DC进行了检查,对于所有其他服务器,它都可以正常工作,仅另一个2008 R2 Server给出了相同的结果计数64。我还确认这不是复制问题。

Need Help. 需要帮忙。

I find strange that you use !(sAMAccountType=805306370) in the search criteria. 我发现您在搜索条件中使用!(sAMAccountType=805306370)很奇怪。 There are different values for sAMAccountType . sAMAccountType有不同的值。 There are new supported values for new operation system (compare http://msdn.microsoft.com/en-us/library/cc220839(PROT.13).aspx and http://msdn.microsoft.com/en-us/library/cc228417(PROT.13).aspx . Moreover you write about user accounts, so the point of your interest are SAM_USER_OBJECT ( 0x30000000 or 805306368 ). 对于新操作系统,有新的受支持值(请比较http://msdn.microsoft.com/zh-cn/library/cc220839(PROT.13).aspxhttp://msdn.microsoft.com/zh-cn/ library / cc228417(PROT.13).aspx 。此外,您还会撰写有关用户帐户的文章,因此您感兴趣的地方是SAM_USER_OBJECT0x30000000805306368 )。

So I suggest to use the query 所以我建议使用查询

(&
  (objectCategory=person)
  (objectClass=user)
  (sAMAccountType=805306368)
  (createTimeStamp>=20090831022227.0Z)
)

and compare the results on both DCs. 并比较两个DC的结果。 If you do have different results pick up some accounts which are in one set and not in another and search explicit for the account. 如果您有不同的结果,请选择一组中的一组而不是另一组中的帐户,并显式搜索该帐户。

For createTimeStamp : 对于createTimeStamp:

(&(objectCategory=person)(objectClass=user)(!(sAMAccountType=805306370))(createTimeStamp>=20090831022227.0Z)) which will fetch only 64 users irrespective of the domain/OU. (&(objectCategory=person)(objectClass=user)(!(sAMAccountType=805306370))(createTimeStamp>=20090831022227.0Z)) ,无论域/ OU如何,它仅可获取64个用户。

For whenCreated : 对于whenCreated:

(&(objectCategory=person)(objectClass=user)(!(sAMAccountType=805306370))(whenCreated>=20090831022227.0Z)) which will fetch all the recently created users. (&(objectCategory=person)(objectClass=user)(!(sAMAccountType=805306370))(whenCreated>=20090831022227.0Z)) ,这将提取所有最近创建的用户。

I'm still confused why createTimeStamp behaves differently for 2008 R2 alone. 我仍然感到困惑,为什么createTimeStamp仅在2008 R2上表现不同。

PS: My domain functional level & forest functional level both are 2008 R2 PS:我的域功能级别和林功能级别均为2008 R2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Windows Server 2008 R2上重置密码 - Reset password on Windows Server 2008 R2 WTSQuerySessionInformation()在Windows Server 2008 R2上失败 - WTSQuerySessionInformation() is failing on windows server 2008 R2 在Windows 2008 R2服务器上运行PHP - Running PHP on a Windows 2008 R2 server Windows Server 2008 R2任务计划程序 - Windows server 2008 r2 Task Scheduler Windows Server 2008 R2中的批处理脚本 - Batch Script in Windows Server 2008 R2 是否应该在 Windows 7 机器上安装用于 powershell 的活动目录模块来导入它,还是可以从 Windows 2008 R2 DC 远程导入? - Should active directory module for powershell installed on a windows 7 machine to import it or can it be remotely imported from a Windows 2008 R2 DC? 针对较旧的 Windows 版本 (Windows Server 2008 R2) - Targeting older Windows versions (Windows Server 2008 R2) 是否可以在 windows 服务器 2008 r2 上安装 WSL 或 windows 终端? - Is it possible install WSL or windows terminal on windows server 2008 r2? Windows 7和Windows Server 2008 R2中的不同WinSxS行为 - Different WinSxS behaviour in Windows 7 and Windows Server 2008 R2 Filezilla服务器在Windows Web Server 2008 R2上不起作用 - Filezilla Server not working on Windows Web Server 2008 R2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM