The Samba-Bugzilla – Attachment 8643 Details for
Bug 9720
samba-tool classicupgrade patch to not print incorrect admin passwords
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches cherry-picked from master
0001-samba-tool-classicupgrade-Do-not-print-the-admin-pas.patch (text/plain), 2.18 KB, created by
Andrew Bartlett
on 2013-03-14 08:50:17 UTC
(
hide
)
Description:
patches cherry-picked from master
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2013-03-14 08:50:17 UTC
Size:
2.18 KB
patch
obsolete
>From dc7bd00e358303417a61dc9d84735bd7bf8c158d Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Sat, 22 Dec 2012 09:28:05 +1100 >Subject: [PATCH] samba-tool classicupgrade: Do not print the admin password > during upgrade > >This changes the code to only set and show a new password if no admin >user is found during the upgrade. > >Andrew Bartlett > >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >Autobuild-Date(master): Thu Jan 10 16:55:23 CET 2013 on sn-devel-104 >(cherry picked from commit 051a1a9c6417c2cbffa7d091ae477a6c7922d363) >--- > source4/scripting/python/samba/upgrade.py | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py >index 13d33c1..d6f906b 100644 >--- a/source4/scripting/python/samba/upgrade.py >+++ b/source4/scripting/python/samba/upgrade.py >@@ -35,6 +35,7 @@ from samba.credentials import Credentials > from samba import dsdb > from samba.ndr import ndr_pack > from samba import unix2nttime >+from samba import generate_random_password > > > def import_sam_policy(samdb, policy, logger): >@@ -829,11 +830,19 @@ Please fix this account before attempting to upgrade again > if not (serverrole == "ROLE_DOMAIN_BDC" or serverrole == "ROLE_DOMAIN_PDC"): > dns_backend = "NONE" > >+ # If we found an admin user, set a fake pw that we will override. >+ # This avoids us printing out an admin password that we won't actually >+ # set. >+ if admin_user: >+ adminpass = generate_random_password(12, 32) >+ else: >+ adminpass = None >+ > # Do full provision > result = provision(logger, session_info, None, > targetdir=targetdir, realm=realm, domain=domainname, > domainsid=str(domainsid), next_rid=next_rid, >- dc_rid=machinerid, >+ dc_rid=machinerid, adminpass = adminpass, > dom_for_fun_level=dsdb.DS_DOMAIN_FUNCTION_2003, > hostname=netbiosname.lower(), machinepass=machinepass, > serverrole=serverrole, samdb_fill=FILL_FULL, >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 9720
: 8643