In another thread on this list (https://lists.samba.org/archive/samba/2019-August/225607.html), Rowland suggested that the following command doesn't work ie it still requests the password: samba-tool domain backup online --targetdir=<output-dir> --server=<DC-server> -k yes However, I tried it out on one of my DCs and found it created the backup but failed at the end as this excerpt of the console output shows: root at tiger-db:~# kinit Administrator Password for Administrator at MICROLYNX.ORG: root at tiger-db:~# samba-tool domain backup online --targetdir=backups --server=tiger-db.microlynx.org -k yes INFO 2019-08-29 17:03:50,319 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1549: workgroup is MICROLYNX INFO 2019-08-29 17:03:50,320 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1552: realm is microlynx.org Calling bare provision ... [snip] ... Committing SAM database INFO 2019-08-29 17:04:06,889 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1643: Setting isSynchronized and dsServiceName INFO 2019-08-29 17:04:07,303 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1555: Cloned domain MICROLYNX (SID S-1-5-21-4012640977-2272627666-3977488320) ERROR(<class 'IndexError'>): uncaught exception - list index out of range File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185, in _run return self.run(*args, **kwargs) File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 258, in run new_sid = get_sid_for_restore(remote_sam) File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 81, in get_sid_for_restore rid = int(res[0].get('rIDNextRID')[0]) Is this another bug? Thanks, Roy
On 29/08/2019 17:20, Roy Eastwood wrote:> In another thread on this list (https://lists.samba.org/archive/samba/2019-August/225607.html), Rowland suggested that the following > command doesn't work ie it still requests the password: > > samba-tool domain backup online --targetdir=<output-dir> --server=<DC-server> -k yes > > However, I tried it out on one of my DCs and found it created the backup but failed at the end as this excerpt of the console output > shows: > > root at tiger-db:~# kinit Administrator > Password for Administrator at MICROLYNX.ORG: > root at tiger-db:~# samba-tool domain backup online --targetdir=backups --server=tiger-db.microlynx.org -k yes > INFO 2019-08-29 17:03:50,319 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1549: workgroup is MICROLYNX > INFO 2019-08-29 17:03:50,320 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1552: realm is microlynx.org > Calling bare provision > ... > [snip] > ... > Committing SAM database > INFO 2019-08-29 17:04:06,889 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1643: Setting isSynchronized and dsServiceName > INFO 2019-08-29 17:04:07,303 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1555: Cloned domain MICROLYNX (SID > S-1-5-21-4012640977-2272627666-3977488320) > ERROR(<class 'IndexError'>): uncaught exception - list index out of range > File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185, in _run > return self.run(*args, **kwargs) > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 258, in run > new_sid = get_sid_for_restore(remote_sam) > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 81, in get_sid_for_restore > rid = int(res[0].get('rIDNextRID')[0]) > > Is this another bug? > > Thanks, > > Roy > >Never got that, just kept getting asked for the Administrator password, after which the backup completed successfully Check your AD. Rowland
> -----Original Message----- > From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Rowland penny via samba > Sent: 29 August 2019 17:48 > To: samba at lists.samba.org > Subject: Re: [Samba] Online Backup Fails - list index out of range > > On 29/08/2019 17:20, Roy Eastwood wrote: > > In another thread on this list (https://lists.samba.org/archive/samba/2019-August/225607.html), Rowland suggested that the > following > > command doesn't work ie it still requests the password: > > > > samba-tool domain backup online --targetdir=<output-dir> --server=<DC-server> -k yes > > > > However, I tried it out on one of my DCs and found it created the backup but failed at the end as this excerpt of the consoleoutput> > shows: > > > > root at tiger-db:~# kinit Administrator > > Password for Administrator at MICROLYNX.ORG: > > root at tiger-db:~# samba-tool domain backup online --targetdir=backups --server=tiger-db.microlynx.org -k yes > > INFO 2019-08-29 17:03:50,319 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1549: workgroup is MICROLYNX > > INFO 2019-08-29 17:03:50,320 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1552: realm is microlynx.org > > Calling bare provision > > ... > > [snip] > > ... > > Committing SAM database > > INFO 2019-08-29 17:04:06,889 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1643: Setting isSynchronized and > dsServiceName > > INFO 2019-08-29 17:04:07,303 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1555: Cloned domain MICROLYNX (SID > > S-1-5-21-4012640977-2272627666-3977488320) > > ERROR(<class 'IndexError'>): uncaught exception - list index out of range > > File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185, in _run > > return self.run(*args, **kwargs) > > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 258, in run > > new_sid = get_sid_for_restore(remote_sam) > > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 81, in get_sid_for_restore > > rid = int(res[0].get('rIDNextRID')[0]) > > > > Is this another bug? > > > > Thanks, > > > > Roy > > > > > Never got that, just kept getting asked for the Administrator password, > after which the backup completed successfully > > Check your AD. > > Rowlandsamba-tool dbcheck --cross-ncs shows no errors, and running Louis' samba-check-db-repl.sh script shows that replication between the two DCs is working OK, as is sysvol replication. There are no errors in the samba logs and I have not seen any problems with the operation of the domain. What else to check? FWIW the samba version is 4.10.6 from Louis' repo running on Debian Buster. Roy
On 30/08/19 4:20 AM, Roy Eastwood via samba wrote:> INFO 2019-08-29 17:04:06,889 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1643: Setting isSynchronized and dsServiceName > INFO 2019-08-29 17:04:07,303 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1555: Cloned domain MICROLYNX (SID > S-1-5-21-4012640977-2272627666-3977488320) > ERROR(<class 'IndexError'>): uncaught exception - list index out of range > File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185, in _run > return self.run(*args, **kwargs) > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 258, in run > new_sid = get_sid_for_restore(remote_sam) > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 81, in get_sid_for_restore > rid = int(res[0].get('rIDNextRID')[0]) > > Is this another bug?It's not really a bug. The backup process needs to allocate a new RID and the DC you're running the backup against doesn't have a RID pool allocated. E.g. see: https://lists.samba.org/archive/samba/2019-February/221619.html I have improved the error message you get in this case on master, but I haven't backported this yet.
> -----Original Message----- > From: Tim Beale [mailto:timbeale at catalyst.net.nz] > Sent: 29 August 2019 22:08 > To: Roy Eastwood; samba at lists.samba.org > Subject: Re: [Samba] Online Backup Fails - list index out of range > > On 30/08/19 4:20 AM, Roy Eastwood via samba wrote: > > INFO 2019-08-29 17:04:06,889 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1643: Setting isSynchronized and > dsServiceName > > INFO 2019-08-29 17:04:07,303 pid:13945 /usr/lib/python3/dist-packages/samba/join.py #1555: Cloned domain MICROLYNX (SID > > S-1-5-21-4012640977-2272627666-3977488320) > > ERROR(<class 'IndexError'>): uncaught exception - list index out of range > > File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185, in _run > > return self.run(*args, **kwargs) > > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 258, in run > > new_sid = get_sid_for_restore(remote_sam) > > File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 81, in get_sid_for_restore > > rid = int(res[0].get('rIDNextRID')[0]) > > > > Is this another bug? > > It's not really a bug. The backup process needs to allocate a new RID > and the DC you're running the backup against doesn't have a RID pool > allocated. E.g. see: > > https://lists.samba.org/archive/samba/2019-February/221619.html > > I have improved the error message you get in this case on master, but I > haven't backported this yet.Thanks for that. I still don't understand though as the DC on which I am doing the backup is the RIDAllocationMasterRole owner (actually it owns all the FSMO roles), so shouldn't it be able to provide a new RID? Or am I missing something? Roy