diff options
-rwxr-xr-x | source4/scripting/bin/samba_spnupdate | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate index 9f8f4073d31..d99461a9fc3 100755 --- a/source4/scripting/bin/samba_spnupdate +++ b/source4/scripting/bin/samba_spnupdate @@ -75,7 +75,7 @@ def get_subst_vars(samdb): vars['NETBIOSNAME'] = lp.get('netbios name').upper() vars['WORKGROUP'] = lp.get('workgroup') vars['NTDSGUID'] = samdb.get_ntds_GUID() - res = samdb.search(base=None, scope=ldb.SCOPE_BASE, attrs=["objectGUID"]) + res = samdb.search(base=samdb.get_default_basedn(), scope=ldb.SCOPE_BASE, attrs=["objectGUID"]) guid = samdb.schema_format_value("objectGUID", res[0]['objectGUID'][0]) vars['DOMAINGUID'] = guid return vars @@ -128,7 +128,7 @@ for line in file: spn_list.append(line) # get the current list of SPNs in our sam -res = samdb.search(base="", +res = samdb.search(base=samdb.get_default_basedn(), expression='(&(objectClass=computer)(samaccountname=%s$))' % sub_vars['NETBIOSNAME'], attrs=["servicePrincipalName"]) if not res or len(res) != 1: |