summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-01-15 22:15:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:51 -0500
commitdae67d2f0bb6ea2553af2274d52021e26832dc41 (patch)
tree186d9c9d05e5efb4936d48fc56f2ba7f8dc58a50
parent8799d6b44c15a5e11c1e3528092fbca236561253 (diff)
downloadsamba-dae67d2f0bb6ea2553af2274d52021e26832dc41.tar.gz
samba-dae67d2f0bb6ea2553af2274d52021e26832dc41.tar.bz2
samba-dae67d2f0bb6ea2553af2274d52021e26832dc41.zip
r4763: Join Samba4 to itself during the provision process.
Andrew Bartlett (This used to be commit feca96fe5a1612592757f53f7aa4eb5a39fd24ff)
-rw-r--r--source4/provision.ldif2
-rwxr-xr-xsource4/script/provision.pl5
-rw-r--r--source4/secrets.ldif14
3 files changed, 20 insertions, 1 deletions
diff --git a/source4/provision.ldif b/source4/provision.ldif
index 4815a67cf5..4a6b881d3b 100644
--- a/source4/provision.ldif
+++ b/source4/provision.ldif
@@ -532,7 +532,7 @@ operatingSystemVersion: 4.0
dNSHostName: ${DNSNAME}
objectCategory: CN=Computer,CN=Schema,CN=Configuration,${BASEDN}
isCriticalSystemObject: TRUE
-unicodePwd: ${RANDPASS}
+unicodePwd: ${JOINPASS}
servicePrincipalName: HOST/${DNSNAME}
servicePrincipalName: HOST/${NETBIOSNAME}
servicePrincipalName: CIFS/${DNSNAME}
diff --git a/source4/script/provision.pl b/source4/script/provision.pl
index bfeefc6e86..ca54b07fce 100755
--- a/source4/script/provision.pl
+++ b/source4/script/provision.pl
@@ -19,6 +19,7 @@ my $netbiosname;
my $dnsname;
my $basedn;
my $defaultsite = "Default-First-Site-Name";
+my $joinpass = randpass();
# return the current NTTIME as an integer
sub nttime()
@@ -141,6 +142,10 @@ sub substitute($)
return randpass();
}
+ if ($var eq "JOINPASS") {
+ return $joinpass;
+ }
+
if ($var eq "NTTIME") {
return "" . nttime();
}
diff --git a/source4/secrets.ldif b/source4/secrets.ldif
index 63ce7f2afb..ff8ef06ece 100644
--- a/source4/secrets.ldif
+++ b/source4/secrets.ldif
@@ -7,3 +7,17 @@ dn: CN=LSA Secrets
objectClass: top
objectClass: container
cn: LSA Secrets
+
+dn: CN=Primary Domains
+objectClass: top
+objectClass: container
+cn: Primary Domains
+
+dn: CN=${DOMAIN},CN=Primary Domains
+objectClass: top
+objectClass: primaryDomain
+cn: ${DOMAIN}
+secret: ${JOINPASS}
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+