diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-01-17 16:18:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:57 -0500 |
commit | b494d95e6d94d2659fcbc89f5b26a33921bf1e86 (patch) | |
tree | db8b3c605e6e8252f096b4f1939106b17becae16 /source4/script | |
parent | 3c9a2e225ab4e32ebe569df623a9013d4fcdaca5 (diff) | |
download | samba-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-x | source4/script/provision.pl | 40 |
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, |