summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-05-14 11:22:23 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-05-15 21:13:26 +0200
commit53c2ed566c19a719caa8d302bbca1ef92a88a29f (patch)
tree71bef3f5af68cf480e87fbf7764decc10643859d /python
parentb2002b67b809e847d78f8d52d0eae041be61e897 (diff)
downloadsamba-53c2ed566c19a719caa8d302bbca1ef92a88a29f.tar.gz
samba-53c2ed566c19a719caa8d302bbca1ef92a88a29f.tar.bz2
samba-53c2ed566c19a719caa8d302bbca1ef92a88a29f.zip
samba-tool domain: Extend --plaintext-secrets to dcpromo by moving to common options
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/domain.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index ca85de18234..c346430dbec 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -108,6 +108,9 @@ string_version_to_constant = {
common_provision_join_options = [
Option("--machinepass", type="string", metavar="PASSWORD",
help="choose machine password (otherwise random)"),
+ Option("--plaintext-secrets", action="store_true",
+ help="Store secret/sensitive values as plain text on disk" +
+ "(default is to encrypt secret/ensitive values)"),
Option("--targetdir", metavar="DIR",
help="Set target directory (where to store provision)", type=str),
Option("--quiet", help="Be quiet", action="store_true"),
@@ -252,9 +255,6 @@ class cmd_domain_provision(Command):
Option("--partitions-only",
help="Configure Samba's partitions, but do not modify them (ie, join a BDC)", action="store_true"),
Option("--use-rfc2307", action="store_true", help="Use AD to store posix attributes (default = no)"),
- Option("--plaintext-secrets", action="store_true",
- help="Store secret/sensitive values as plain text on disk" +
- "(default is to encrypt secret/ensitive values)"),
Option("--backend-store", type="choice", metavar="BACKENDSTORE",
choices=["tdb", "mdb"],
help="Specify the database backend to be used "
@@ -599,7 +599,7 @@ class cmd_domain_dcpromo(Command):
versionopts=None, server=None, site=None, targetdir=None,
domain_critical_only=False, parent_domain=None, machinepass=None,
use_ntvfs=False, dns_backend=None,
- quiet=False, verbose=False):
+ quiet=False, verbose=False, plaintext_secrets=False):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
net = Net(creds, lp, server=credopts.ipaddress)
@@ -623,13 +623,13 @@ class cmd_domain_dcpromo(Command):
domain_critical_only=domain_critical_only,
machinepass=machinepass, use_ntvfs=use_ntvfs,
dns_backend=dns_backend,
- promote_existing=True)
+ promote_existing=True, plaintext_secrets=plaintext_secrets)
elif role == "RODC":
join_RODC(logger=logger, server=server, creds=creds, lp=lp, domain=domain,
site=site, netbios_name=netbios_name, targetdir=targetdir,
domain_critical_only=domain_critical_only,
machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend,
- promote_existing=True)
+ promote_existing=True, plaintext_secrets=plaintext_secrets)
else:
raise CommandError("Invalid role '%s' (possible values: DC, RODC)" % role)
@@ -660,9 +660,6 @@ class cmd_domain_join(Command):
"BIND9_DLZ uses samba4 AD to store zone information, "
"NONE skips the DNS setup entirely (this DC will not be a DNS server)",
default="SAMBA_INTERNAL"),
- Option("--plaintext-secrets", action="store_true",
- help="Store secret/sensitive values as plain text on disk" +
- "(default is to encrypt secret/ensitive values)"),
Option("--verbose", help="Be verbose", action="store_true")
]