[Samba] [SOLVED] Re: Problem switching to BIND9_DLZ

mourik jan heupink heupink at merit.unu.edu
Fri Nov 13 10:20:09 UTC 2015


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



More information about the samba mailing list