summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-01-17 16:18:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:57 -0500
commitb494d95e6d94d2659fcbc89f5b26a33921bf1e86 (patch)
treedb8b3c605e6e8252f096b4f1939106b17becae16
parent3c9a2e225ab4e32ebe569df623a9013d4fcdaca5 (diff)
downloadsamba-b494d95e6d94d2659fcbc89f5b26a33921bf1e86.tar.gz
samba-b494d95e6d94d2659fcbc89f5b26a33921bf1e86.tar.bz2
samba-b494d95e6d94d2659fcbc89f5b26a33921bf1e86.zip
r4806: - add some data to the configuration naming context
- add some stuff to make w2k3 dc join to get the correct values metze (This used to be commit d1490635622023f5c672eea70260265960ac48b6)
-rw-r--r--source4/provision.ldif245
-rwxr-xr-xsource4/script/provision.pl40
2 files changed, 270 insertions, 15 deletions
diff --git a/source4/provision.ldif b/source4/provision.ldif
index cbce0ce12f..f97c1077ea 100644
--- a/source4/provision.ldif
+++ b/source4/provision.ldif
@@ -41,6 +41,9 @@ dn: @MODULES
# uncomment this if you want to enable schema checking
#@MODULE: schema
+###############################
+# Domain Naming Context
+###############################
dn: ${BASEDN}
objectClass: top
objectClass: domain
@@ -70,10 +73,13 @@ objectSid: ${DOMAINSID}
serverState: 1
nTMixedDomain: 1
msDS-Behavior-Version: 0
+ridManagerReference: CN=RID Manager$,CN=System,${BASEDN}
uASCompat: 1
modifiedCount: 1
objectCategory: CN=Domain-DNS,CN=Schema,CN=Configuration,${BASEDN}
isCriticalSystemObject: TRUE
+subRefs: CN=Configuration,${BASEDN}
+subRefs: CN=Schema,CN=Configuration,${BASEDN}
dn: CN=Users,${BASEDN}
objectClass: top
@@ -160,6 +166,70 @@ systemFlags: 0x8c000000
objectCategory: CN=Container,CN=Schema,CN=Configuration,${BASEDN}
isCriticalSystemObject: TRUE
+dn: CN=RID Manager$,CN=System,${BASEDN}
+objectclass: top
+objectclass: rIDManager
+cn: RID Manager$
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: 1
+uSNChanged: 1
+showInAdvancedViewOnly: TRUE
+name: RID Manager$
+objectGUID: ${NEWGUID}
+systemFlags: 0x8c000000
+objectCategory: CN=RID-Manager,CN=Schema,CN=Configuration,${BASEDN}
+isCriticalSystemObject: TRUE
+fSMORoleOwner: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+rIDAvailablePool: 4611686014132423217
+
+dn: CN=DomainUpdates,CN=System,${BASEDN}
+objectClass: top
+objectClass: container
+cn: DomainUpdates
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: 1
+uSNChanged: 1
+showInAdvancedViewOnly: TRUE
+name: DomainUpdates
+objectGUID: ${NEWGUID}
+objectCategory: CN=Container,CN=Schema,CN=Configuration,${BASEDN}
+
+dn: CN=Windows2003Update,CN=DomainUpdates,CN=System,${BASEDN}
+objectClass: top
+objectClass: container
+cn: Windows2003Update
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: 1
+uSNChanged: 1
+showInAdvancedViewOnly: TRUE
+name: Windows2003Update
+objectGUID: ${NEWGUID}
+objectCategory: CN=Container,CN=Schema,CN=Configuration,${BASEDN}
+revision: 8
+
+dn: CN=Infrastructure,${BASEDN}
+objectclass: top
+objectclass: infrastructureUpdate
+cn: Infrastructure
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: 1
+uSNChanged: 1
+showInAdvancedViewOnly: TRUE
+name: Infrastructure
+objectGUID: ${NEWGUID}
+systemFlags: 0x8c000000
+objectCategory: CN=Infrastructure-Update,CN=Schema,CN=Configuration,${BASEDN}
+isCriticalSystemObject: TRUE
+fSMORoleOwner: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+
dn: CN=Builtin,${BASEDN}
objectClass: top
objectClass: builtinDomain
@@ -843,7 +913,7 @@ whenCreated: ${LDAPTIME}
whenChanged: ${LDAPTIME}
uSNCreated: 1
uSNChanged: 1
-showInAdvancedViewOnly: FALSE
+showInAdvancedViewOnly: TRUE
name: Templates
objectGUID: ${NEWGUID}
systemFlags: 0x8c000000
@@ -982,6 +1052,179 @@ cn: TemplateTrustedDomain
name: TemplateTrustedDomain
instanceType: 4
+###############################
+# Configuration Naming Context
+###############################
+dn: CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: configuration
+cn: Configuration
+instanceType: 13
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Configuration
+objectGUID: ${NEWGUID}
+objectCategory: CN=Configuration,CN=Schema,CN=Configuration,${BASEDN}
+subRefs: CN=Schema,CN=Configuration,${BASEDN}
+masteredBy: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+msDs-masteredBy: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+
+dn: CN=Partitions,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: crossRefContainer
+cn: Partitions
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Partitions
+objectGUID: ${NEWGUID}
+systemFlags: 0x80000000
+objectCategory: CN=Cross-Ref-Container,CN=Schema,CN=Configuration,${BASEDN}
+msDS-Behavior-Version: 0
+fSMORoleOwner: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+
+dn: CN=Enterprise Configuration,CN=Partitions,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: crossRef
+cn: Enterprise Configuration
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Enterprise Configuration
+objectGUID: ${NEWGUID}
+systemFlags: 0x00000001
+objectCategory: CN=Cross-Ref,CN=Schema,CN=Configuration,${BASEDN}
+nCName: CN=Configuration,${BASEDN}
+dnsRoot: ${DNSDOMAIN}
+
+dn: CN=Enterprise Schema,CN=Partitions,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: crossRef
+cn: Enterprise Schema
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Enterprise Schema
+objectGUID: ${NEWGUID}
+systemFlags: 0x00000001
+objectCategory: CN=Cross-Ref,CN=Schema,CN=Configuration,${BASEDN}
+nCName: CN=Schema,CN=Configuration,${BASEDN}
+dnsRoot: ${DNSDOMAIN}
+
+dn: CN=${DOMAIN},CN=Partitions,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: crossRef
+cn: ${DOMAIN}
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: ${DOMAIN}
+objectGUID: ${NEWGUID}
+systemFlags: 0x00000003
+objectCategory: CN=Cross-Ref,CN=Schema,CN=Configuration,${BASEDN}
+nCName: ${BASEDN}
+nETBIOSName: ${DOMAIN}
+dnsRoot: ${DNSDOMAIN}
+
+dn: CN=Sites,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: sitesContainer
+cn: Sites
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Sites
+objectGUID: ${NEWGUID}
+systemFlags: 0x82000000
+objectCategory: CN=Sites-Container,CN=Schema,CN=Configuration,${BASEDN}
+
+dn: CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: site
+cn: Sites
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Sites
+objectGUID: ${NEWGUID}
+systemFlags: 0x82000000
+objectCategory: CN=Site,CN=Schema,CN=Configuration,${BASEDN}
+
+dn: CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: serversContainer
+cn: Servers
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: Servers
+objectGUID: ${NEWGUID}
+systemFlags: 0x82000000
+objectCategory: CN=Servers-Container,CN=Schema,CN=Configuration,${BASEDN}
+
+dn: CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: server
+cn: ${NETBIOSNAME}
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: ${NETBIOSNAME}
+objectGUID: ${NEWGUID}
+systemFlags: 0x52000000
+objectCategory: CN=Server,CN=Schema,CN=Configuration,${BASEDN}
+dNSHostName: ${DNSNAME}
+serverReference: CN=${NETBIOSNAME},OU=Domain Controllers,${BASEDN}
+
+dn: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: applicationSettings
+objectClass: nTDSDSA
+cn: NTDS Settings
+instanceType: 4
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+uSNCreated: ${USN}
+uSNChanged: ${USN}
+showInAdvancedViewOnly: TRUE
+name: NTDS Settings
+systemFlags: 0x02000000
+objectCategory: CN=NTDS-DSA,CN=Schema,CN=Configuration,${BASEDN}
+dMDLocation: CN=Schema,CN=Configuration,${BASEDN}
+objectGUID: ${INVOCATIONID}
+invocationId: ${INVOCATIONID}
+msDS-Behavior-Version: 2
+
+###############################
+# Schema Naming Context
+###############################
# Schema, Configuration, ${DNSDOMAIN}
dn: CN=Schema,CN=Configuration,${BASEDN}
objectClass: top
diff --git a/source4/script/provision.pl b/source4/script/provision.pl
index 98e25095e6..d6c4cd68fe 100755
--- a/source4/script/provision.pl
+++ b/source4/script/provision.pl
@@ -19,7 +19,6 @@ my $netbiosname;
my $dnsname;
my $basedn;
my $defaultsite = "Default-First-Site-Name";
-my $joinpass = randpass();
my $usn = 1;
# return the current NTTIME as an integer
@@ -44,7 +43,8 @@ sub randguid()
}
my $opt_domainguid = randguid();
-my $hostguid = randguid();
+my $opt_hostguid = randguid();
+my $opt_invocationid = randguid();
sub randsid()
{
@@ -66,6 +66,8 @@ sub randpass()
return $pass;
}
+my $joinpass = randpass();
+
sub ldaptime()
{
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time);
@@ -132,7 +134,11 @@ sub substitute($)
}
if ($var eq "HOSTGUID") {
- return $hostguid;
+ return $opt_hostguid;
+ }
+
+ if ($var eq "INVOCATIONID") {
+ return $opt_invocationid;
}
if ($var eq "DEFAULTSITE") {
@@ -243,15 +249,19 @@ sub ShowHelp()
Samba4 provisioning
provision.pl [options]
- --realm REALM set realm
- --domain DOMAIN set domain
- --hostname HOSTNAME set hostname
- --hostip IPADDRESS set ipaddress
- --adminpass PASSWORD choose admin password (otherwise random)
- --nobody USERNAME choose 'nobody' user
- --nogroup GROUPNAME choose 'nogroup' group
- --wheel GROUPNAME choose 'wheel' privileged group
- --users GROUPNAME choose 'users' group
+ --realm REALM set realm
+ --domain DOMAIN set domain
+ --domain-guid GUID set domainguid (otherwise random)
+ --domain-sid SID set domainsid (otherwise random)
+ --host-name HOSTNAME set hostname
+ --host-ip IPADDRESS set ipaddress
+ --host-guid GUID set hostguid (otherwise random)
+ --invocationid GUID set invocationid (otherwise random)
+ --adminpass PASSWORD choose admin password (otherwise random)
+ --nobody USERNAME choose 'nobody' user
+ --nogroup GROUPNAME choose 'nogroup' group
+ --wheel GROUPNAME choose 'wheel' privileged group
+ --users GROUPNAME choose 'users' group
You must provide at least a realm and domain
@@ -267,8 +277,10 @@ GetOptions(
'domain=s' => \$opt_domain,
'domain-guid=s' => \$opt_domainguid,
'domain-sid=s' => \$opt_domainsid,
- 'hostname=s' => \$opt_hostname,
- 'hostip=s' => \$opt_hostip,
+ 'host-name=s' => \$opt_hostname,
+ 'host-ip=s' => \$opt_hostip,
+ 'host-guid=s' => \$opt_hostguid,
+ 'invocationid=s' => \$opt_invocationid,
'adminpass=s' => \$opt_adminpass,
'nobody=s' => \$opt_nobody,
'nogroup=s' => \$opt_nogroup,