diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-09-22 12:57:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:09 -0500 |
commit | ee257e902ade941f734d5b647511d14e051ac0d1 (patch) | |
tree | 3503b046dbb0efafe3906821be8641980fdbb598 /source4/selftest/env/Samba4.pm | |
parent | 733591c079eb646344333bcad091839cd15992e7 (diff) | |
download | samba-ee257e902ade941f734d5b647511d14e051ac0d1.tar.gz samba-ee257e902ade941f734d5b647511d14e051ac0d1.tar.bz2 samba-ee257e902ade941f734d5b647511d14e051ac0d1.zip |
r25299: Modify the provision script to take an additional argument: --server-role
This must be set to either 'domain controller', 'domain member' or 'standalone'.
The default for the provision now changes to 'standalone'.
This is not because Samba4 is particularlly useful in that mode, but
because we still want a positive sign from the administrator that we
should advertise as a DC.
We now do more to ensure the 'standalone' and 'member server'
provision output is reasonable, and try not to set odd things into the
database that only belong for the DC.
Andrew Bartlett
(This used to be commit 4cc4ed7719aff712e735628410bd3813c7d6aa40)
Diffstat (limited to 'source4/selftest/env/Samba4.pm')
-rw-r--r-- | source4/selftest/env/Samba4.pm | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm index c8d2ccc94b..0cd9c2e2be 100644 --- a/source4/selftest/env/Samba4.pm +++ b/source4/selftest/env/Samba4.pm @@ -297,10 +297,6 @@ sub provision($$$$$$) $tmpdir); - my $localdomain = $domain; - $localdomain = $netbiosname if $server_role eq "member server"; - my $localrealm = $realm; - $localrealm = $netbiosname if $server_role eq "member server"; my $localbasedn = $basedn; $localbasedn = "DC=$netbiosname" if $server_role eq "member server"; @@ -416,9 +412,9 @@ my @provision_options = ("$self->{bindir}/smbscript", "$self->{setupdir}/provisi push (@provision_options, split(' ', $configuration)); push (@provision_options, "--host-name=$netbiosname"); push (@provision_options, "--host-ip=$ifaceipv4"); - push (@provision_options, "--quiet"); - push (@provision_options, "--domain=$localdomain"); - push (@provision_options, "--realm=$localrealm"); +# push (@provision_options, "--quiet"); + push (@provision_options, "--domain=$domain"); + push (@provision_options, "--realm=$realm"); push (@provision_options, "--adminpass=$password"); push (@provision_options, "--krbtgtpass=krbtgt$password"); push (@provision_options, "--machinepass=machine$password"); @@ -426,6 +422,7 @@ my @provision_options = ("$self->{bindir}/smbscript", "$self->{setupdir}/provisi push (@provision_options, "--simple-bind-dn=cn=Manager,$localbasedn"); push (@provision_options, "--password=$password"); push (@provision_options, "--root=$root"); + push (@provision_options, "--server-role=$server_role"); my $ldap_uri= "$ldapdir/ldapi"; $ldap_uri =~ s|/|%2F|g; @@ -454,7 +451,7 @@ my @provision_options = ("$self->{bindir}/smbscript", "$self->{setupdir}/provisi if (defined($self->{ldap})) { push (@provision_options, "--ldap-backend=$ldap_uri"); - system("$self->{bindir}/smbscript $self->{setupdir}/provision-backend $configuration --ldap-manager-pass=$password --root=$root --realm=$localrealm --host-name=$netbiosname --ldap-backend-type=$self->{ldap}>&2") == 0 or die("backend provision failed"); + system("$self->{bindir}/smbscript $self->{setupdir}/provision-backend $configuration --ldap-manager-pass=$password --root=$root --realm=$realm --host-name=$netbiosname --ldap-backend-type=$self->{ldap}>&2") == 0 or die("backend provision failed"); if ($self->{ldap} eq "openldap") { ($ret->{SLAPD_CONF}, $ret->{OPENLDAP_PIDFILE}) = $self->mk_openldap($ldapdir, $configuration) or die("Unable to create openldap directories"); |