summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsamba_wizard/Samba.pm46
-rwxr-xr-xsamba_wizard/Sambashare.pm2
2 files changed, 34 insertions, 14 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index a1974549..631685d8 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -57,6 +57,10 @@ my $o = {
wiz_password_server => '',
wiz_passdb_backend => '', wiz_passdb_backend_yn => '',
wiz_ldap_admin_dn => '', wiz_ldap_suffix => '', wiz_ldap_root_pw => '', wiz_ldap_root_pw_2 => '',
+ wiz_preferred_master => '',
+ wiz_wins_server => '',
+ wiz_name_resolve_order => '',
+ wiz_dns_proxy => '',
wiz_sambatype => '',
},
init => sub {
@@ -81,7 +85,7 @@ my %type = (
);
my @yesorno = qw(yes no); push @yesorno, "";
-my @loglevel = qw(0 1 2 3 4 5 6 7 8 9); push @loglevel, "10";
+my @loglevel = qw(0 1 2 3 4 5 6 7 8 9 10);
$o->{pages} = {
welcome => {
@@ -119,9 +123,11 @@ $o->{pages} = {
$o->{var}{wiz_domain_logons} = "yes";
$o->{var}{wiz_wins_support} ||= $samba->{global}{'wins support'};
$o->{var}{wiz_oslevel} = "128";
- if ($samba->{global}{'passdb backend'}) {
+
+ if (exists $samba->{global}{'passdb backend'}) {
$o->{var}{wiz_passdb_backend_yn} = "yes";
- } else {
+ }
+ else {
$o->{var}{wiz_passdb_backend_yn} = "no";
}
},
@@ -145,34 +151,48 @@ $o->{pages} = {
next => 'ask_workgroup',
},
bdc => {
- name => N('BDC server: backup domain controller') . "\n\n" . N('This enables BDCs to carry much of the network logon processing. A BDC on a local segment handles logon requests and authenticates users when the PDC is busy on the local network. When a segment becomes heavily loaded, the reponsibility is offloaded to another segment\'s BDC or to the PDC. Therefore, you can optimize resources and add robustness to network services by deploying BDCs throughout the network.'),
+ name => N('BDC server: backup domain controller') . "\n\n" . N('This enables BDCs to carry much of the network logon processing. A BDC on a local segment handles logon requests and authenticates users when the PDC is busy on the local network. When a segment becomes heavily loaded, the reponsibility is offloaded to another segment\'s BDC or to the PDC.'),
pre => sub {
$o->{var}{wiz_domain_master} = "no";
$o->{var}{wiz_security} = "user";
- $o->{var}{wiz_wins_support} = "no";
+ $o->{var}{wiz_wins_support} = "";
$o->{var}{wiz_oslevel} = "70";
$o->{var}{wiz_local_master} = "yes";
$o->{var}{wiz_domain_master} = "no";
$o->{var}{wiz_preferred_master} = "yes";
$o->{var}{wiz_domain_logons} = "yes";
- $o->{var}{wiz_wins_server} = "192.168.10.107";
- $o->{var}{wiz_name_resolve_order} = "wins lmhosts bcast";
+ $o->{var}{wiz_wins_server} = "";
+ if ($samba->{global}{'name resolve order'}) {
+ $o->{var}{wiz_name_resolve_order} = $samba->{global}{'name resolve order'}
+ } else { $o->{var}{wiz_name_resolve_order} = "lmhosts host wins bcast" }
$o->{var}{wiz_dns_proxy} = "no";
},
data => [
- { label => N('Security:'), fixed_val => \$o->{var}{wiz_security} },
- { label => N('Domain master:'), fixed_val => \$o->{var}{wiz_domain_master} },
- { label => N('Wins support:'), val => \$o->{var}{wiz_wins_support}, fixed_val => \@yesorno },
- { label => N('Wins server:'), val => \$o->{var}{wiz_wins_server} },
+ { label => N('Wins support:'), val => \$o->{var}{wiz_wins_support}, fixed_list => \@yesorno },
+ { label => N('Wins server:'), val => \$o->{var}{wiz_wins_server}, help => N('This specifies the IP address (or DNS name: IP address for preference) of the WINS server that nmbd(8) should register with. If you have a WINS server on your network then you should set this to the WINS server\'s IP.') },
+ { label => N('Wins name resolve order:'), val => \$o->{var}{wiz_name_resolve_order} },
],
complete => sub {
- if (!$o->{var}{wiz_wins_support} =~ /no/ and !$o->{var}{wiz_wins_server} ) {
+ if ($o->{var}{wiz_wins_support} =~ /no/ and !$o->{var}{wiz_wins_server} ) {
$::in->ask_warn(N("Error"), N("Your server doesn't support Wins. Please provide a Wins server, or leave blank Wins Support entry."));
return 1
} else { return 0 };
},
- next => 'ask_workgroup',
+ next => 'ask_bdc2',
},
+ ask_bdc2 => {
+ name => N('BDC server: needed fixed options'),
+ data => [
+ { label => N('Domain master:'), fixed_val => \$o->{var}{wiz_domain_master} },
+ { label => N('Security:'), fixed_val => \$o->{var}{wiz_security} },
+ { label => N('Os level:'), fixed_val => \$o->{var}{wiz_oslevel} },
+ { label => N('Local master:'), fixed_val => \$o->{var}{wiz_local_master} },
+ { label => N('Domain master'), fixed_val => \$o->{var}{wiz_domain_master} },
+ { label => N('Prefered master'), fixed_val => \$o->{var}{wiz_preferred_master} },
+ { label => N('Domain logons'), fixed_val => \$o->{var}{wiz_domain_logons} },
+ ],
+ next => 'ask_workgroup',
+ },
member => {
name => N('Member of a domain') . "\n\n" . ('Share data, users home or printers.') . "\n" . N('Please enter the domain you want to join.'),
pre => sub {
diff --git a/samba_wizard/Sambashare.pm b/samba_wizard/Sambashare.pm
index db850321..044684ba 100755
--- a/samba_wizard/Sambashare.pm
+++ b/samba_wizard/Sambashare.pm
@@ -58,7 +58,7 @@ my $o = {
# we ask glueconf to give us the structure representing /etc/samba/smb.conf
my $samba = new Libconf::Glueconf::Samba::Smb_conf({ filename => '/etc/samba/smb.conf', show_commented_info => 1 });
-use Data::Dumper;
+#use Data::Dumper;
#print Dumper($samba);
my %level = (