LoginSignup
2
3

More than 5 years have passed since last update.

Active Directory で LDAP API を使った操作をログに記録する

Posted at

Active Directory は MS 製 LDAP サーバといえるもので、OpenLDAP の ldapsearch コマンドとかでディレクトリ検索できますが、デフォルトではそのログが記録されません。

LDAP インターフェイスを介したイベントを記録するにはレジストリを変更します。
Windows Server2008 なら↓をコピペした .reg ファイルを読み込みます。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics]
"1 Knowledge Consistency Checker"=dword:00000000
"2 Security Events"=dword:00000000
"3 ExDS Interface Events"=dword:00000000
"4 MAPI Interface Events"=dword:00000000
"5 Replication Events"=dword:00000000
"6 Garbage Collection"=dword:00000000
"7 Internal Configuration"=dword:00000000
"8 Directory Access"=dword:00000000
"9 Internal Processing"=dword:00000000
"10 Performance Counters"=dword:00000000
"11 Initialization/Termination"=dword:00000000
"12 Service Control"=dword:00000000
"13 Name Resolution"=dword:00000000
"14 Backup"=dword:00000000
"15 Field Engineering"=dword:00000000
"16 LDAP Interface Events"=dword:00000003
"17 Setup"=dword:00000000
"18 Global Catalog"=dword:00000000
"19 Inter-site Messaging"=dword:00000000
"20 Group Caching"=dword:00000000
"21 Linked-Value Replication"=dword:00000000
"22 DS RPC Client"=dword:00000000
"23 DS RPC Server"=dword:00000000
"24 DS Schema"=dword:00000000

"16 LDAP Interface Events"=dword:00000003 の右辺を書き換えることでログに出力される情報の粒度を変更できます。

dword:00000005 -> どーでもいい情報まで出力されます
dword:00000000 -> MS 曰く「クリティカルなイベントのみ記録」

参考: http://technet.microsoft.com/library/Cc961809

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3