summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-17 12:22:44 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-18 13:13:31 +1100
commit5f1161581084693d9c03b0d72a77856f99463b70 (patch)
tree4bf5cf4488177f9abfea874913a5c048f80a87a3 /source4/scripting
parentd4d4f4e07fc7a38e29ec27a7c75d2bdb8e9afcc5 (diff)
downloadsamba-5f1161581084693d9c03b0d72a77856f99463b70.tar.gz
samba-5f1161581084693d9c03b0d72a77856f99463b70.tar.bz2
samba-5f1161581084693d9c03b0d72a77856f99463b70.zip
s4-s3-upgrade: Give a better clue when we cannot open secrets.tdb
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/scripting')
-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]