summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py2
-rw-r--r--source4/scripting/python/samba/upgrade.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 3906d69a2d..47b7e4a8dd 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -545,7 +545,7 @@ class cmd_domain_samba3upgrade(Command):
Option("--libdir", type="string", metavar="DIR",
help="Path to samba3 database directory"),
Option("--testparm", type="string", metavar="PATH",
- help="Path to samba3 testparm utility"),
+ help="Path to samba3 testparm utility from the previous installation. This allows the default paths of the previous installation to be followed"),
Option("--targetdir", type="string", metavar="DIR",
help="Path prefix where the new Samba 4.0 AD domain should be initialised"),
Option("--quiet", help="Be quiet"),
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 07cb720f88..265bdbdd28 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -469,7 +469,10 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, useeadb=Fa
netbiosname = samba3.lp.get("netbios name")
# secrets db
- secrets_db = samba3.get_secrets_db()
+ try:
+ secrets_db = samba3.get_secrets_db()
+ except IOError, e:
+ raise ProvisioningError("Could not open '%s', the Samba3 secrets database: %s. Perhaps you specified the incorrect smb.conf, --testparm or --libdir option?" % samba3.privatedir_path("secrets.tdb"), str(e))
if not domainname:
domainname = secrets_db.domains()[0]