summaryrefslogtreecommitdiffstats
path: root/samba_wizard
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-08-23 13:24:07 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-08-23 13:24:07 +0000
commitc8be0235d65a1cda14fa8cffc96cf86b72262094 (patch)
tree90cce49a58e7f53c3372e724806c1e257546ac48 /samba_wizard
parent281d36357bab3a3a0c55fdb913964305a8b9cb61 (diff)
downloaddrakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar.gz
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar.bz2
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.tar.xz
drakwizard-c8be0235d65a1cda14fa8cffc96cf86b72262094.zip
added homes
Diffstat (limited to 'samba_wizard')
-rw-r--r--samba_wizard/samba.wiz53
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm22
2 files changed, 53 insertions, 22 deletions
diff --git a/samba_wizard/samba.wiz b/samba_wizard/samba.wiz
index f490b5dc..4de65ece 100644
--- a/samba_wizard/samba.wiz
+++ b/samba_wizard/samba.wiz
@@ -24,7 +24,12 @@
shellVariable="wiz_do_printer_sharing"
>
</Variable>
-
+ <Variable
+ name="doHomes"
+ comment="true if samba do printer sharing"
+ shellVariable="wiz_do_homes"
+ >
+ </Variable>
<Variable
name="workgroup"
comment="The workgroup name"
@@ -87,7 +92,7 @@
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
name="ask_services"
- jumpScript="__WIZ_HOME__/samba_wizard/scripts/check_services.sh"
+ func="check_services"
executionLevel="NORMAL"
nextFinish="false"
canBack="true"
@@ -95,14 +100,14 @@
>
<Target
- targetName="error_in_services"
- jumpIndex="1"
+ targetName="warn_smbpasswd"
+ jumpIndex="2"
>
</Target>
<Target
targetName="ask_workgroup"
- jumpIndex="10"
+ jumpIndex="0"
>
</Target>
@@ -123,7 +128,7 @@
variableName="doFileSharing"
forceEnabled="true"
forceDisabled="false"
- helpText="Enable Common File Sharing Area"
+ helpText="Enable /home/samba/public Sharing Area"
>
</Boolean>
@@ -135,31 +140,37 @@
helpText="Enable Server Printer Sharing"
>
</Boolean>
+ <Boolean
+ name="homesSharingBoolean"
+ variableName="doHomes"
+ forceEnabled="true"
+ forceDisabled="false"
+ helpText="Make homes directory availables for
+ theirs owners"
+ >
+ </Boolean>
+
</Page>
+
<Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_in_services"
- comment="Error message for an incorrect hostname"
- jumpPage="ask_hostname"
+ name="warn_smbpasswd"
+ comment="Warning"
+ jumpPage="ask_workgroup"
nextButtonText="OK"
executionLevel="NORMAL"
- nextFinish="true"
+ nextFinish="false"
canBack="true"
canCancel="true"
>
<Info
- helpText="No Samba service has been requested"
- >
- </Info>
-
- <Info
- helpText="Press Quit to exit or Back to correct your choice"
+ helpText="You have selected to allow user access theirs home directories via samba but you/they must use smbpasswd to set a password."
>
</Info>
</Page>
+
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
name="ask_workgroup"
@@ -332,6 +343,14 @@ needed to configure Samba."
</Freetext>
<Freetext
+ name="freetext2"
+ variableName="doHomes"
+ helpText="Home :"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
name="freetext3"
variableName="workgroup"
helpText="Workgroup:"
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index 577c1870..62b57ed2 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -3,7 +3,7 @@
package Smbconf;
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
-
+use MDK::Common;
use strict;
# All possibilies in the config file must be precedeed by ";"
@@ -22,6 +22,11 @@ sub check {
0;
}
+sub check_services {
+ $ENV{wiz_do_homes} and return 2;
+ 0;
+}
+
sub read_conf {
my ($file) = @_;
my $menu;
@@ -81,14 +86,20 @@ sub chg_var {
$conf{$menu}{$var}{value} = $str;
}
-
sub file_sharing {
- standalone->explanations("Enabling samba file sharing");
- comment_menu("homes", ";");
+ mkdir_p("/home/samba/public");
+ standalone->explanations("Enabling samba /home/samba/public sharing");
+# comment_menu("homes", ";");
comment_menu("public", "");
chg_var("global", "security", "share");
}
+sub homes {
+ standalone->explanations("Enabling samba /home/samba/public sharing");
+ comment_menu("homes", "");
+ chg_var("global", "security", "share");
+}
+
sub printer_sharing {
standalone->explanations("Enabling samba printer sharing");
comment_menu("printers", "");
@@ -104,10 +115,11 @@ sub do_it {
my $ip = $o->get_from_known_dev("IP");
file_sharing() if $ENV{wiz_do_file_sharing};
printer_sharing() if $ENV{wiz_do_printer_sharing};
+ homes() if $ENV{wiz_do_homes};
chg_var("global", "hosts allow", $ip);
chg_var("global", "security", "share");
write_conf("/etc/samba/smb.conf");
- system("/etc/rc.d/init.d/smb restart >/dev/null 2>&1");
+ system("/etc/rc.d/init.d/smb restart");
10;
}
1;