From 064eb82870596e72373c290dfaf0e6b8289303de Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Jan 2008 13:25:01 +1100 Subject: Remove --ldap-base from the python provision script (This is a merge from the ejs script) Andrew Bartlett (This used to be commit d822dfa017b84895222ace8c44935fb872930548) --- source4/setup/provision.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source4/setup') diff --git a/source4/setup/provision.py b/source4/setup/provision.py index e166d5f3dd..88015ce0a3 100755 --- a/source4/setup/provision.py +++ b/source4/setup/provision.py @@ -34,7 +34,7 @@ from auth import system_session import samba.getopt as options import param from samba.provision import (provision, - provision_paths_from_lp, provision_ldapbase) + provision_paths_from_lp) parser = optparse.OptionParser("provision [options]") parser.add_option_group(options.SambaOptions(parser)) @@ -81,9 +81,6 @@ parser.add_option("--users", type="string", metavar="GROUPNAME", parser.add_option("--quiet", help="Be quiet", action="store_true") parser.add_option("--blank", action="store_true", help="do not add users or groups, just the structure") -parser.add_option("--ldap-base", - help="output only an LDIF file, suitable for creating an LDAP baseDN", - action="store_true") parser.add_option("--ldap-backend", type="string", metavar="LDAPSERVER", help="LDAP server to use for this provision") parser.add_option("--ldap-module=", type="string", metavar="MODULE", @@ -152,10 +149,7 @@ creds = credopts.get_credentials() setup_dir = opts.setupdir if setup_dir is None: setup_dir = "setup" -if opts.ldap_base: - provision_ldapbase(setup_dir, message, paths) - message("Please install the LDIF located in %s, %s and into your LDAP server, and re-run with --ldap-backend=ldap://my.ldap.server" % (paths.ldap_basedn_ldif, paths.ldap_config_basedn_ldif, paths.ldap_schema_basedn_ldif)) -elif opts.partitions_only: +if opts.partitions_only: provision_become_dc(setup_dir, message, False, paths, lp, system_session(), creds) else: -- cgit From 958b0e8ad1eb85881a2f7c3d193d121c21e7a258 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Jan 2008 13:28:52 +1100 Subject: Use syncrepl on all OpenLDAP databases (creates contextCSN attribute) This module needs to be loaded on each database, not just the main partition. We use it to create the usn for the entries. Andrew Bartlett (This used to be commit ffb12aad8a80bb90d66dc66baba81b856622a6bb) --- source4/setup/slapd.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/setup') diff --git a/source4/setup/slapd.conf b/source4/setup/slapd.conf index e4e86eece9..83f4da3359 100644 --- a/source4/setup/slapd.conf +++ b/source4/setup/slapd.conf @@ -34,6 +34,12 @@ index lDAPDisplayName eq index subClassOf eq index cn eq +#syncprov is stable in OpenLDAP 2.3, and available in 2.2. +#We only need this for the contextCSN attribute anyway.... +overlay syncprov +syncprov-checkpoint 100 10 +syncprov-sessionlog 100 + database hdb suffix ${CONFIGDN} directory ${LDAPDIR}/db/config @@ -48,6 +54,12 @@ index dnsRoot eq index nETBIOSName eq index cn eq +#syncprov is stable in OpenLDAP 2.3, and available in 2.2. +#We only need this for the contextCSN attribute anyway.... +overlay syncprov +syncprov-checkpoint 100 10 +syncprov-sessionlog 100 + database hdb suffix ${DOMAINDN} rootdn ${LDAPMANAGERDN} -- cgit From 873c7457c61584aec8c051849863151af79e2894 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Jan 2008 13:30:20 +1100 Subject: Don't manually specify instanceID in the template files. The instanceid module creates this automaticlly, so we don't need this any more. Andrew Bartlett (This used to be commit f6dbdf34e8a790f460b705100e45ee3928b6b1b3) --- source4/setup/display_specifiers.ldif | 2 -- source4/setup/provision.ldif | 8 -------- source4/setup/provision_computers_modify.ldif | 3 --- source4/setup/provision_configuration.ldif | 12 ------------ source4/setup/provision_configuration_basedn_modify.ldif | 6 ------ source4/setup/provision_schema_basedn_modify.ldif | 3 --- source4/setup/provision_self_join.ldif | 2 -- source4/setup/provision_templates.ldif | 1 - source4/setup/provision_users.ldif | 3 --- source4/setup/provision_users_modify.ldif | 3 --- 10 files changed, 43 deletions(-) (limited to 'source4/setup') diff --git a/source4/setup/display_specifiers.ldif b/source4/setup/display_specifiers.ldif index b76955a0cb..574912b3e8 100644 --- a/source4/setup/display_specifiers.ldif +++ b/source4/setup/display_specifiers.ldif @@ -2,14 +2,12 @@ dn: CN=DisplaySpecifiers,${CONFIGDN} objectClass: top objectClass: container showInAdvancedViewOnly: TRUE -instanceType: 4 dn: CN=409,CN=DisplaySpecifiers,${CONFIGDN} objectClass: top objectClass: container cn: 409 name: 409 -instanceType: 4 showInAdvancedViewOnly: TRUE dn: CN=user-Display,CN=409,CN=DisplaySpecifiers,${CONFIGDN} diff --git a/source4/setup/provision.ldif b/source4/setup/provision.ldif index c6b07c5751..5e15bf347a 100644 --- a/source4/setup/provision.ldif +++ b/source4/setup/provision.ldif @@ -3,7 +3,6 @@ objectClass: top objectClass: organizationalUnit cn: Domain Controllers description: Default container for domain controllers -instanceType: 4 showInAdvancedViewOnly: FALSE systemFlags: 2348810240 isCriticalSystemObject: TRUE @@ -13,7 +12,6 @@ objectClass: top objectClass: container cn: ForeignSecurityPrincipals description: Default container for security identifiers (SIDs) associated with objects from external, trusted domains -instanceType: 4 showInAdvancedViewOnly: FALSE systemFlags: 2348810240 isCriticalSystemObject: TRUE @@ -23,7 +21,6 @@ objectClass: top objectClass: container cn: System description: Builtin system settings -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2348810240 isCriticalSystemObject: TRUE @@ -32,7 +29,6 @@ dn: CN=RID Manager$,CN=System,${DOMAINDN} objectclass: top objectclass: rIDManager cn: RID Manager$ -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2348810240 isCriticalSystemObject: TRUE @@ -43,14 +39,12 @@ dn: CN=DomainUpdates,CN=System,${DOMAINDN} objectClass: top objectClass: container cn: DomainUpdates -instanceType: 4 showInAdvancedViewOnly: TRUE dn: CN=Windows2003Update,CN=DomainUpdates,CN=System,${DOMAINDN} objectClass: top objectClass: container cn: Windows2003Update -instanceType: 4 showInAdvancedViewOnly: TRUE revision: 8 @@ -58,7 +52,6 @@ dn: CN=Infrastructure,${DOMAINDN} objectclass: top objectclass: infrastructureUpdate cn: Infrastructure -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2348810240 isCriticalSystemObject: TRUE @@ -68,7 +61,6 @@ dn: CN=Builtin,${DOMAINDN} objectClass: top objectClass: builtinDomain cn: Builtin -instanceType: 4 showInAdvancedViewOnly: FALSE forceLogoff: 9223372036854775808 lockoutDuration: -18000000000 diff --git a/source4/setup/provision_computers_modify.ldif b/source4/setup/provision_computers_modify.ldif index b7502e5107..3bb4074d42 100644 --- a/source4/setup/provision_computers_modify.ldif +++ b/source4/setup/provision_computers_modify.ldif @@ -3,9 +3,6 @@ changetype: modify replace: description description: Default container for upgraded computer accounts - -replace: instanceType -instanceType: 4 -- replace: showInAdvancedViewOnly showInAdvancedViewOnly: FALSE - diff --git a/source4/setup/provision_configuration.ldif b/source4/setup/provision_configuration.ldif index 050f110d9a..750fa1326a 100644 --- a/source4/setup/provision_configuration.ldif +++ b/source4/setup/provision_configuration.ldif @@ -5,7 +5,6 @@ dn: CN=Partitions,${CONFIGDN} objectClass: top objectClass: crossRefContainer cn: Partitions -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2147483648 msDS-Behavior-Version: 0 @@ -15,7 +14,6 @@ dn: CN=Enterprise Configuration,CN=Partitions,${CONFIGDN} objectClass: top objectClass: crossRef cn: Enterprise Configuration -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 1 nCName: ${CONFIGDN} @@ -25,7 +23,6 @@ dn: CN=Enterprise Schema,CN=Partitions,${CONFIGDN} objectClass: top objectClass: crossRef cn: Enterprise Schema -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 1 nCName: ${SCHEMADN} @@ -35,7 +32,6 @@ dn: CN=${DOMAIN},CN=Partitions,${CONFIGDN} objectClass: top objectClass: crossRef cn: ${DOMAIN} -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 3 nCName: ${DOMAINDN} @@ -46,7 +42,6 @@ dn: CN=Sites,${CONFIGDN} objectClass: top objectClass: sitesContainer cn: Sites -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2181038080 @@ -54,7 +49,6 @@ dn: CN=${DEFAULTSITE},CN=Sites,${CONFIGDN} objectClass: top objectClass: site cn: ${DEFAULTSITE} -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2181038080 @@ -62,7 +56,6 @@ dn: CN=Servers,CN=${DEFAULTSITE},CN=Sites,${CONFIGDN} objectClass: top objectClass: serversContainer cn: Servers -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2181038080 @@ -70,7 +63,6 @@ dn: CN=Services,${CONFIGDN} objectClass: top objectClass: container cn: Services -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 2147483648 @@ -78,14 +70,12 @@ dn: CN=Windows NT,CN=Services,${CONFIGDN} objectClass: top objectClass: container cn: Windows NT -instanceType: 4 showInAdvancedViewOnly: TRUE dn: CN=Directory Service,CN=Windows NT,CN=Services,${CONFIGDN} objectClass: top objectClass: nTDSService cn: Directory Service -instanceType: 4 showInAdvancedViewOnly: TRUE sPNMappings: host=ldap,dns,cifs,http @@ -93,14 +83,12 @@ dn: CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,${CONFIGDN} objectClass: top objectClass: container cn: Query-Policies -instanceType: 4 showInAdvancedViewOnly: TRUE dn: CN=Default Query Policy,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,${CONFIGDN} objectClass: top objectClass: queryPolicy cn: Default Query Policy -instanceType: 4 showInAdvancedViewOnly: TRUE lDAPAdminLimits: MaxValRange=1500 lDAPAdminLimits: MaxReceiveBuffer=10485760 diff --git a/source4/setup/provision_configuration_basedn_modify.ldif b/source4/setup/provision_configuration_basedn_modify.ldif index 46ba4e9649..a72f2c8eca 100644 --- a/source4/setup/provision_configuration_basedn_modify.ldif +++ b/source4/setup/provision_configuration_basedn_modify.ldif @@ -3,14 +3,8 @@ ############################### dn: ${CONFIGDN} changetype: modify -replace: instanceType -instanceType: 13 -- replace: showInAdvancedViewOnly showInAdvancedViewOnly: TRUE - -replace: objectCategory -objectCategory: CN=Configuration,${SCHEMADN} -- replace: subRefs subRefs: ${SCHEMADN} diff --git a/source4/setup/provision_schema_basedn_modify.ldif b/source4/setup/provision_schema_basedn_modify.ldif index 92c5cf1ace..986f0d632c 100644 --- a/source4/setup/provision_schema_basedn_modify.ldif +++ b/source4/setup/provision_schema_basedn_modify.ldif @@ -3,9 +3,6 @@ ############################### dn: ${SCHEMADN} changetype: modify -replace: instanceType -instanceType: 13 -- replace: showInAdvancedViewOnly showInAdvancedViewOnly: TRUE - diff --git a/source4/setup/provision_self_join.ldif b/source4/setup/provision_self_join.ldif index 06230e8d00..1caa62163e 100644 --- a/source4/setup/provision_self_join.ldif +++ b/source4/setup/provision_self_join.ldif @@ -43,7 +43,6 @@ dn: CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,${CONFIGDN} objectClass: top objectClass: server cn: ${NETBIOSNAME} -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 1375731712 dNSHostName: ${DNSNAME} @@ -55,7 +54,6 @@ objectClass: applicationSettings objectClass: nTDSDSA cn: NTDS Settings options: 1 -instanceType: 4 showInAdvancedViewOnly: TRUE systemFlags: 33554432 dMDLocation: ${SCHEMADN} diff --git a/source4/setup/provision_templates.ldif b/source4/setup/provision_templates.ldif index 8797efaf98..04eaabcab7 100644 --- a/source4/setup/provision_templates.ldif +++ b/source4/setup/provision_templates.ldif @@ -66,7 +66,6 @@ sAMAccountType: 268435456 # # dn: CN=TemplateAlias,CN=Templates # cn: TemplateAlias -# instanceType: 4 # groupType: -2147483644 # sAMAccountType: 268435456 diff --git a/source4/setup/provision_users.ldif b/source4/setup/provision_users.ldif index 7c1a438d8e..3e6f717f15 100644 --- a/source4/setup/provision_users.ldif +++ b/source4/setup/provision_users.ldif @@ -134,7 +134,6 @@ objectClass: top objectClass: group cn: RAS and IAS Servers description: Servers in this group can access remote access properties of users -instanceType: 4 objectSid: ${DOMAINSID}-553 sAMAccountName: RAS and IAS Servers sAMAccountType: 536870912 @@ -307,7 +306,6 @@ objectClass: top objectClass: group cn: Server Operators description: Members can administer domain servers -instanceType: 4 objectSid: S-1-5-32-549 adminCount: 1 sAMAccountName: Server Operators @@ -327,7 +325,6 @@ objectClass: top objectClass: group cn: Account Operators description: Members can administer domain user and group accounts -instanceType: 4 objectSid: S-1-5-32-548 adminCount: 1 sAMAccountName: Account Operators diff --git a/source4/setup/provision_users_modify.ldif b/source4/setup/provision_users_modify.ldif index 42dff07080..06954c44f0 100644 --- a/source4/setup/provision_users_modify.ldif +++ b/source4/setup/provision_users_modify.ldif @@ -3,9 +3,6 @@ changetype: modify replace: description description: Default container for upgraded user accounts - -replace: instanceType -instanceType: 4 -- replace: showInAdvancedViewOnly showInAdvancedViewOnly: FALSE - -- cgit