diff options
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/provision/__init__.py | 5 |
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, |