summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-10-11 14:45:10 +0200
committerJelmer Vernooij <jelmer@samba.org>2012-10-11 17:05:40 +0200
commitc2d14747d608d406de6410556807d467cd0b85ef (patch)
tree60619f7865d52bdb17c635a2c2ff1d7cf3a18358
parent276460cf8afb4894fe1e980c7a75e866c14ba144 (diff)
downloadsamba-c2d14747d608d406de6410556807d467cd0b85ef.tar.gz
samba-c2d14747d608d406de6410556807d467cd0b85ef.tar.bz2
samba-c2d14747d608d406de6410556807d467cd0b85ef.zip
provision: Always create DNS user.
The DNS user is currently only used by the bind9 plugin. This makes it easier to later on switch between the builtin DNS server and bind backend. In addition, ideally the internal DNS server would use that (separate) user too. Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Thu Oct 11 17:05:40 CEST 2012 on sn-devel-104
-rw-r--r--source4/scripting/python/samba/provision/__init__.py31
1 files changed, 13 insertions, 18 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 9966192a19..d9ba90cab5 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -969,7 +969,7 @@ def setup_samdb_rootdse(samdb, names):
def setup_self_join(samdb, admin_session_info, names, fill, machinepass,
- dns_backend, dnspass, domainsid, next_rid, invocationid,
+ dnspass, domainsid, next_rid, invocationid,
policyguid, policyguid_dc,
domainControllerFunctionality, ntdsguid=None, dc_rid=None):
"""Join a host to its own domain."""
@@ -1048,17 +1048,14 @@ def setup_self_join(samdb, admin_session_info, names, fill, machinepass,
samdb.set_session_info(admin_session_info)
- if dns_backend != "SAMBA_INTERNAL":
- # This is Samba4 specific and should be replaced by the correct
- # DNS AD-style setup
- setup_add_ldif(samdb, setup_path("provision_dns_add_samba.ldif"), {
- "DNSDOMAIN": names.dnsdomain,
- "DOMAINDN": names.domaindn,
- "DNSPASS_B64": b64encode(dnspass.encode('utf-16-le')),
- "HOSTNAME" : names.hostname,
- "DNSNAME" : '%s.%s' % (
- names.netbiosname.lower(), names.dnsdomain.lower())
- })
+ setup_add_ldif(samdb, setup_path("provision_dns_add_samba.ldif"), {
+ "DNSDOMAIN": names.dnsdomain,
+ "DOMAINDN": names.domaindn,
+ "DNSPASS_B64": b64encode(dnspass.encode('utf-16-le')),
+ "HOSTNAME" : names.hostname,
+ "DNSNAME" : '%s.%s' % (
+ names.netbiosname.lower(), names.dnsdomain.lower())
+ })
def getpolicypath(sysvolpath, dnsdomain, guid):
@@ -1146,7 +1143,7 @@ def setup_samdb(path, session_info, provision_backend, lp, names,
def fill_samdb(samdb, lp, names, logger, domainsid, domainguid, policyguid,
- policyguid_dc, fill, adminpass, krbtgtpass, machinepass, dns_backend,
+ policyguid_dc, fill, adminpass, krbtgtpass, machinepass,
dnspass, invocationid, ntdsguid, serverrole, am_rodc=False,
dom_for_fun_level=None, schema=None, next_rid=None, dc_rid=None):
@@ -1334,7 +1331,6 @@ def fill_samdb(samdb, lp, names, logger, domainsid, domainguid, policyguid,
logger.info("Setting up self join")
setup_self_join(samdb, admin_session_info, names=names, fill=fill,
invocationid=invocationid,
- dns_backend=dns_backend,
dnspass=dnspass,
machinepass=machinepass,
domainsid=domainsid,
@@ -1607,8 +1603,8 @@ def provision_fill(samdb, secrets_ldb, logger, names, paths,
next_rid=1000, dc_rid=None, adminpass=None, krbtgtpass=None,
domainguid=None, policyguid=None, policyguid_dc=None,
invocationid=None, machinepass=None, ntdsguid=None,
- dns_backend=None, dnspass=None,
- serverrole=None, dom_for_fun_level=None,
+ dns_backend=None,
+ dnspass=None, serverrole=None, dom_for_fun_level=None,
am_rodc=False, lp=None, use_ntvfs=False, skip_sysvolacl=False):
# create/adapt the group policy GUIDs
# Default GUID for default policy are described at
@@ -1636,8 +1632,7 @@ def provision_fill(samdb, secrets_ldb, logger, names, paths,
policyguid=policyguid, policyguid_dc=policyguid_dc,
fill=samdb_fill, adminpass=adminpass, krbtgtpass=krbtgtpass,
invocationid=invocationid, machinepass=machinepass,
- dns_backend=dns_backend, dnspass=dnspass,
- ntdsguid=ntdsguid, serverrole=serverrole,
+ dnspass=dnspass, ntdsguid=ntdsguid, serverrole=serverrole,
dom_for_fun_level=dom_for_fun_level, am_rodc=am_rodc,
next_rid=next_rid, dc_rid=dc_rid)