From 27e7578e2763f0e9de2e0c94521d552678244cf2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 Feb 2010 15:09:15 +0100 Subject: s4:provision: use generate_random_password() metze --- source4/scripting/bin/upgradeprovision | 2 +- source4/scripting/python/samba/provision.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index e2ee8d053f..1d58f5e2c9 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -875,7 +875,7 @@ def update_machine_account_password(paths,creds,session,names): assert(len(res) == 1) msg = ldb.Message(res[0].dn) - machinepass = glue.generate_random_str(12) + machinepass = glue.generate_random_password(128, 255) msg["userPassword"] = ldb.MessageElement(machinepass, ldb.FLAG_MOD_REPLACE, "userPassword") sam_ldb.modify(msg) diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index def91f3651..dfd47b7962 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -1149,16 +1149,16 @@ def provision(setup_dir, message, session_info, policyguid_dc = policyguid_dc.upper() if adminpass is None: - adminpass = glue.generate_random_str(12) + adminpass = glue.generate_random_password(12, 32) if krbtgtpass is None: - krbtgtpass = glue.generate_random_str(12) + krbtgtpass = glue.generate_random_password(128, 255) if machinepass is None: - machinepass = glue.generate_random_str(12) + machinepass = glue.generate_random_password(128, 255) if dnspass is None: - dnspass = glue.generate_random_str(12) + dnspass = glue.generate_random_password(128, 255) if ldapadminpass is None: #Make a new, random password between Samba and it's LDAP server - ldapadminpass=glue.generate_random_str(12) + ldapadminpass=glue.generate_random_password(128, 255) if backend_type is None: backend_type = "ldb" -- cgit