From 8ca39dfbe18557969e543da5fa9ef0e3c2fd0aa9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 16 Feb 2012 12:06:34 +0100 Subject: s4:provision: only print the adminpass if it was generated (not user-provided) --- source4/scripting/python/samba/provision/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index abf693779d..25a455169d 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -1744,6 +1744,9 @@ def provision(logger, session_info, credentials, smbconf=None, if adminpass is None: adminpass = samba.generate_random_password(12, 32) + adminpass_generated = True + else: + adminpass_generated = False if samdb_fill == FILL_FULL: provision_fill(samdb, secrets_ldb, logger, @@ -1799,7 +1802,8 @@ def provision(logger, session_info, credentials, smbconf=None, logger.info("DNS Domain: %s" % names.dnsdomain) logger.info("DOMAIN SID: %s" % str(domainsid)) if samdb_fill == FILL_FULL: - logger.info("Admin password: %s" % adminpass) + if adminpass_generated: + logger.info("Admin password: %s" % adminpass) if provision_backend.type is not "ldb": if provision_backend.credentials.get_bind_dn() is not None: logger.info("LDAP Backend Admin DN: %s" % -- cgit