summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-02-16 11:21:30 +0100
committerMichael Adam <obnox@samba.org>2012-02-16 12:07:49 +0100
commit09b865b2f00fceef62af1228552fedd08cfee461 (patch)
tree9bb3862863b230c32ac4fa92cdbec2efe6e6b0d4 /source4/scripting
parent32cf164d999624dce752aac319a3316f268cb931 (diff)
downloadsamba-09b865b2f00fceef62af1228552fedd08cfee461.tar.gz
samba-09b865b2f00fceef62af1228552fedd08cfee461.tar.bz2
samba-09b865b2f00fceef62af1228552fedd08cfee461.zip
s4:provision: generate the adminpass provision() instead of provision_fill()
so that the adminpass can be logged at the end (otherwise we get "None")
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index fc92c88ce3..abf693779d 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1436,8 +1436,6 @@ def provision_fill(samdb, secrets_ldb, logger, names, paths,
if invocationid is None:
invocationid = str(uuid.uuid4())
- if adminpass is None:
- adminpass = samba.generate_random_password(12, 32)
if krbtgtpass is None:
krbtgtpass = samba.generate_random_password(128, 255)
if machinepass is None:
@@ -1744,6 +1742,9 @@ def provision(logger, session_info, credentials, smbconf=None,
if not os.path.isdir(paths.netlogon):
os.makedirs(paths.netlogon, 0755)
+ if adminpass is None:
+ adminpass = samba.generate_random_password(12, 32)
+
if samdb_fill == FILL_FULL:
provision_fill(samdb, secrets_ldb, logger,
names, paths, schema=schema, targetdir=targetdir,