From 09b865b2f00fceef62af1228552fedd08cfee461 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 16 Feb 2012 11:21:30 +0100 Subject: s4:provision: generate the adminpass provision() instead of provision_fill() so that the adminpass can be logged at the end (otherwise we get "None") --- source4/scripting/python/samba/provision/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4') 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, -- cgit