Also note that you aren't searching by GUID. You are searching for
objectclass=* and your base is the GUID you specify.
Here is the difference
[Thu 04/14/2005 19:37:28.56]
F:\DEV\cpp\SecTok>adfind -config -binenc -f
"objectguid={{GUID:22857DB8-9281-4660-A16B-D97F40A07AC6}}" objectguid
AdFind V01.26.00cpp Joe Richards ([EMAIL PROTECTED]) February 2005
Transformed Filter: objectguid=\B8\7D\85\22\81\92\60F\A1k\D9\7F\40\A0z\C6
Using server: 2k3dc01.joe.com
Directory: Windows Server 2003
Base DN: CN=Configuration,DC=joe,DC=com
dn:CN=2K3DC01,CN=Servers,CN=MyMainSite,CN=Sites,CN=Configuration,DC=joe,DC=c
om
>objectGUID: {22857DB8-9281-4660-A16B-D97F40A07AC6}
1 Objects returned
[Thu 04/14/2005 19:37:35.49]
F:\DEV\cpp\SecTok>adfind -b "<GUID=22857DB8-9281-4660-A16B-D97F40A07AC6>"
objectguid
AdFind V01.26.00cpp Joe Richards ([EMAIL PROTECTED]) February 2005
Using server: 2k3dc01.joe.com
Directory: Windows Server 2003
dn:CN=2K3DC01,CN=Servers,CN=MyMainSite,CN=Sites,CN=Configuration,DC=joe,DC=c
om
>objectGUID: {22857DB8-9281-4660-A16B-D97F40A07AC6}
dn:CN=NTDS
Settings,CN=2K3DC01,CN=Servers,CN=MyMainSite,CN=Sites,CN=Configuration,DC=jo
e,DC=com
>objectGUID: {D44A5269-FCB0-473F-9D19-0A7CE1BCBB81}
dn:CN=917c66cf-dc6e-4ea4-a265-f4bb8563ac2b,CN=NTDS
Settings,CN=2K3DC01,CN=Servers,CN=MyMainSite,CN=Sites,CN=Configuration,DC=jo
e,DC=com
>objectGUID: {8697EB29-A582-4E09-913A-1385397F94CF}
dn:CN=ff357f4a-5bd9-44d7-b157-467f6f9483c9,CN=NTDS
Settings,CN=2K3DC01,CN=Servers,CN=MyMainSite,CN=Sites,CN=Configuration,DC=jo
e,DC=com
>objectGUID: {12812DFA-AFA9-4FE2-95D1-5822E3CE9172}
4 Objects returned
[Thu 04/14/2005 19:37:40.74]
F:\DEV\cpp\SecTok>
joe
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Fleischman
Sent: Tuesday, April 12, 2005 11:50 AM
To: [email protected]
Subject: RE: [ActiveDir] LDP guid lookup
Note the parameter after your GUID syntax below is a 2. This tells me you're
doing a subtree search. So you're doing a subtree search, with the baseDN
being the object specified by the GUID, and finding all matches below it (
that is the objectclass=* term). So it is subtree "dumping" everything below
that guid.
If you want to just dump the matching object, switch it to a base search.
~Eric
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kern, Tom
Sent: Tuesday, April 12, 2005 7:15 AM
To: ActiveDir (E-mail)
Subject: [ActiveDir] LDP guid lookup
Quick question.
When i do a search by guid of a DC using ldp.exe, why do I get more than one
server as a result?
example-
dap_search_ext_s(ld, "<GUID=1825a294-808e-4036-adae-51144dee742f>", 2,
"(objectclass=*)", attrList, 0, svrCtrls, ClntCtrls, 999, 999 ,&msg) Result
<0>: (null) Matched DNs:
Getting 4 entries:
>> Dn: CN=NTDS
Settings,CN=MYRTLEBEACH,CN=Servers,CN=BA-MYRTLEBEACH,CN=Sites,CN=Configu
ration,DC=CSG-IT,DC=NET
>> Dn: CN=BA-FILE-SERVER,CN=NTDS
Settings,CN=MYRTLEBEACH,CN=Servers,CN=BA-MYRTLEBEACH,CN=Sites,CN=Configu
ration,DC=CSG-IT,DC=NET
>> Dn: CN=CSG-DS1,CN=NTDS
Settings,CN=MYRTLEBEACH,CN=Servers,CN=BA-MYRTLEBEACH,CN=Sites,CN=Configu
ration,DC=CSG-IT,DC=NET
>> Dn: CN=664b0575-574b-42fb-bc93-d76051ceb384,CN=NTDS
Settings,CN=MYRTLEBEACH,CN=Servers,CN=BA-MYRTLEBEACH,CN=Sites,CN=Configu
ration,DC=CSG-IT,DC=NET
I get 3 DC's- myrtlebeach,ba-fileserver,and csg-ds1.
Thanks
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/