diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-02-24 15:09:15 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-26 08:57:30 +0100 |
commit | 27e7578e2763f0e9de2e0c94521d552678244cf2 (patch) | |
tree | f7f6d7ca9b2cd4463af108dd13b5ba2bac295d1d /source4 | |
parent | d2cd0a783b059fc2a938f7e2a5f5d002e83be967 (diff) | |
download | samba-27e7578e2763f0e9de2e0c94521d552678244cf2.tar.gz samba-27e7578e2763f0e9de2e0c94521d552678244cf2.tar.bz2 samba-27e7578e2763f0e9de2e0c94521d552678244cf2.zip |
s4:provision: use generate_random_password()
metze
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/bin/upgradeprovision | 2 | ||||
-rw-r--r-- | 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" |