[Samba] List Index Out of Range
Rowland penny
rpenny at samba.org
Wed Nov 6 09:25:31 UTC 2019
On 06/11/2019 08:01, L.P.H. van Belle via samba wrote:
> Hai,
>
> That looks like its a bug.
>
> I just verified this on a 4.10.10 AD-DC.
> I was hoping a python package was missing but i dont see/have missing packages here.
> I have exact the same result.
>
> I have reported it : https://bugzilla.samba.org/show_bug.cgi?id=14184
Hi Louis, you might want to close that bug report ;-)
It has been fixed in master and at least 4.11.2. Open
/usr/lib/python3/dist-packages/samba/uptodateness.py in your favourite
editor
Go down to 'def get_utdv(samdb, dn):'
Find this block:
res = samdb.search(base=config_dn,
expression=("(&(invocationId=%s)"
"(objectClass=nTDSDSA))" % inv_id),
attrs=["distinguishedName", "invocationId"])
settings_dn = str(res[0]["distinguishedName"][0])
prefix, dsa_dn = settings_dn.split(',', 1)
if prefix != 'CN=NTDS Settings':
And change it to:
res = samdb.search(base=config_dn,
expression=("(&(invocationId=%s)"
"(objectClass=nTDSDSA))" % inv_id),
attrs=["distinguishedName", "invocationId"])
try:
settings_dn = str(res[0]["distinguishedName"][0])
prefix, dsa_dn = settings_dn.split(',', 1)
except IndexError as e:
print("Unknown invocation ID %s" % inv_id,
file=sys.stderr)
continue
if prefix != 'CN=NTDS Settings':
Close and save the file and try again.
Rowland
More information about the samba
mailing list