different GUID formats in AD?
geza at kzsdabas.hu
Mon Apr 1 13:45:58 MDT 2013
Sorry if it is well known, I just didn't find a pointer.
I try to figure out how smart card logon could be implemented using
Samba4 (I'm using ejbca as the CA, which has a procedure for Win DCs and
I try to adapt it).
If I obtain the GUID of a (Samba 4.0.4) domain controller via ldbsearch:
ldbsearch -H /usr/local/samba/private/sam.ldb cn=DC0 objectGUID
(which is what can be expected, according to:
however if I run the following vbscript (with command line argument DC0)
on a Windows 7 domain member:
Set args = WScript.Arguments
Set objStdOut = WScript.StdOut
ServerName = args.Item(0)
Set iAdRootDSE = GetObject("LDAP://RootDSE")
sDefaultNamingContext = iAdRootDSE.Get("defaultNamingContext")
ouName = "OU=Domain Controllers"
Set objDC = GetObject("LDAP://CN=" & ServerName & "," & ouName & "," & sDefaultNamingContext)
sGUID = objDC.GUID
sDNShostname = objDC.dNSHostName
objStdOut.WriteLine("GUID: " & sGUID)
objStdOut.WriteLine("DNS hostname: " & sDNShostname)
(The script is based on
which should be used to generate a certificate request on a Windows DC)
DNS hostname: DC0.kzsdabas.hu
I would be happy if anyone could give me a pointer why are the data1 and
data2 bytes swaped while data3 and data4 is in the original order.
More information about the samba-technical