Overview: The function "tdb_copy" assumes it will find tdbbackup and if not crashes with a hard to understand message about what is going on. Steps to Reproduce: Uninstall tdb-tools. run "samba-tool domain provision --use-rfc2307 --interactive" select BIND9_DLZ for DNS backend. Actual Results: ERROR(<type 'exceptions.OSError'>): uncaught exception - [Errno 2] No such file or directory File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run return self.run(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/samba/netcmd/domain.py", line 474, in run nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode) File "/usr/lib64/python2.7/site-packages/samba/provision/__init__.py", line 2175, in provision skip_sysvolacl=skip_sysvolacl) File "/usr/lib64/python2.7/site-packages/samba/provision/__init__.py", line 1836, in provision_fill targetdir=targetdir, fill_level=samdb_fill) File "/usr/lib64/python2.7/site-packages/samba/provision/sambadns.py", line 1162, in setup_ad_dns hostip6=hostip6, targetdir=targetdir) File "/usr/lib64/python2.7/site-packages/samba/provision/sambadns.py", line 1222, in setup_bind9_dns create_samdb_copy(samdb, logger, paths, names, names.domainsid, domainguid) File "/usr/lib64/python2.7/site-packages/samba/provision/sambadns.py", line 851, in create_samdb_copy os.path.join(dns_dir, "sam.ldb")) File "/usr/lib64/python2.7/site-packages/samba/tdb_util.py", line 36, in tdb_copy status = subprocess.call(tdbbackup_cmd, close_fds=True, shell=False) File "/usr/lib64/python2.7/subprocess.py", line 168, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib64/python2.7/subprocess.py", line 390, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1024, in _execute_child raise child_exception Expected Results: Something meaningful that it couldn't find tdbbackup and that I should probably install tdb-tools. Build Date & Hardware: fedora rawhide samba-dc.x86_64 2:4.7.0-0.4.rc1.fc27 on a virtualbox x64 client machine. Additional Information: I would add something like this: start=====> if not os.path.exists(toolpath): raise Exception("Error I could not find tdbbackup maybe you need to install tdb-tools?") <=====end after the search loop.
Created attachment 13353 [details] fix missing tdbbackup error
Created attachment 13354 [details] fix missing tdbbackup error take 2 Still learning git diff
Created attachment 13358 [details] fix missing tdbbackup error take 3 I think I did it correctly this time take two I tried to manually fix now I see how to do the git diff without adding two directories.
This bug was referenced in samba master: 98e85fc611bc7ba64ef56b3cb03b60213af1b79b
Fixed in master/4.18. I'm guessing nobody has the energy to backport.