summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-02-16 12:06:34 +0100
committerMichael Adam <obnox@samba.org>2012-02-16 12:07:50 +0100
commit8ca39dfbe18557969e543da5fa9ef0e3c2fd0aa9 (patch)
tree43478ad153eb6c6818bfa011c3993cd9de7f59d2 /source4/scripting
parent09b865b2f00fceef62af1228552fedd08cfee461 (diff)
downloadsamba-8ca39dfbe18557969e543da5fa9ef0e3c2fd0aa9.tar.gz
samba-8ca39dfbe18557969e543da5fa9ef0e3c2fd0aa9.tar.bz2
samba-8ca39dfbe18557969e543da5fa9ef0e3c2fd0aa9.zip
s4:provision: only print the adminpass if it was generated (not user-provided)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision/__init__.py6
1 files changed, 5 insertions, 1 deletions
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" %