[Samba] [SOLVED] Re: Problem switching to BIND9_DLZ
Rowland Penny
rowlandpenny241155 at gmail.com
Fri Nov 13 10:30:15 UTC 2015
On 13/11/15 10:20, mourik jan heupink wrote:
> Hi Rowland, Achim, list,
>
>> The search would probably be better something like this:
>>
>> res7 =
>> samdb.search(expression="(name={31B2F340-016D-11D2-945F-00C04FB984F9})",
>> base="CN=Policies,CN=System," + basedn,
>> scope=ldb.SCOPE_ONELEVEL,
>> attrs=["cn","displayName"])
>> names.policyid = str(res7[0]["cn"]).replace("{","").replace("}","")
>>
>> which is the same as:
>>
>> ldbsearch -H /usr/local/samba/private/sam.ldb -b
>> "cn=Policies,cn=System,dc=samdom,dc=example,dc=com" -s one
>> '(name={31B2F340-016D-11D2-945F-00C04FB984F9})' cn displayName
>>
>> which returns:
>>
>> # record 1
>> dn:
>> CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=samdom,DC=example,DC=com
>>
>>
>> cn: {31B2F340-016D-11D2-945F-00C04FB984F9}
>> displayName: Default Domain Policy
>>
>> Rowland
>
> Yes, that is much better, and also is similar to the way windows
> searches for these policies:
>
> https://support.microsoft.com/en-us/kb/556025
>
> MJ
>
If Achim opens a bug report on this, I will propose a patch to fix it.
Rowland
More information about the samba
mailing list