diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-19 17:32:44 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-08-25 07:39:37 +1000 |
commit | 33fb1f85df2bb62bbfdb5b4a859ce0b7261e4e32 (patch) | |
tree | 0ffb0af5f28fb1ccae6236ec4771e9c9e663d58c /source4/scripting | |
parent | b6e18870026a03edfc21a4695824f4c988a14b11 (diff) | |
download | samba-33fb1f85df2bb62bbfdb5b4a859ce0b7261e4e32.tar.gz samba-33fb1f85df2bb62bbfdb5b4a859ce0b7261e4e32.tar.bz2 samba-33fb1f85df2bb62bbfdb5b4a859ce0b7261e4e32.zip |
s4-spnupdate: fixed searches on domain NC
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-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 9f8f4073d3..d99461a9fc 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: |