summaryrefslogtreecommitdiff
path: root/source4/script
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 /source4/script
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)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/provision.pl40
1 files changed, 26 insertions, 14 deletions
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,