【发布时间】:2016-06-17 08:43:56
【问题描述】:
我正在尝试查询 LDAP 以获取用户帐户列表以及他们的帐户何时更改以及由谁更改,如果可能,添加或删除了什么?
系统规格:
微软视窗服务器 2012 R2
Microsoft SQL Server 2008 R2
目前,我可以获取大量有关帐户到期的信息。我们正在尝试审核 AD 中发生的管理员更改,并每天通过电子邮件向我们的主管发送更改...
谢谢各位!
Current Query:
SELECT * INTO #TMP_LDAP FROM OPENQUERY
( ADSI,'SELECT
uSNDSALastObjRemoved,
countrycode,
mail,
cn,
msexchmailboxsecuritydescriptor,
msexchuseraccountcontrol,
adspath,
mailnickname,
lockouttime,
msexchhomeservername,
homemta,
msexchhidefromaddresslists,
msexchalobjectversion,
msexchmailboxguid,
usncreated,
pwdlastset,
objectguid,
logoncount,
msexchrequireauthtosendto,
codepage,
whenchanged,
NAME,
usnchanged,
accountexpires,
legacyexchangedn,
displayname,
primarygroupid,
userprincipalname,
badpwdcount,
admincount,
badpasswordtime,
instancetype,
objectsid,
msmqdigests,
objectcategory,
mdbusedefaults,
samaccounttype,
distinguishedname,
whencreated,
lastlogon,
givenname,
useraccountcontrol,
textencodedoraddress,
msmqsigncertificates,
lastlogontimestamp,
samaccountname,
homemdb
FROM ''LDAP://SER.SERVER.local/OU=Accounting,DC=SERVER,DC=LOCAL'''
【问题讨论】:
-
问题是什么?
标签: sql-server active-directory ldap linked-server audit