summaryrefslogtreecommitdiffstats
path: root/samba_wizard/Samba.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-09-13 10:20:50 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-09-13 10:20:50 +0000
commit19dbaff6332ba151e7b14eb7029926c5f2f1bcbe (patch)
treef037f6aa54203b02e3956af63532cd808c667cdc /samba_wizard/Samba.pm
parent4c1ba59782e72426c88e552e38289377a45ea2f0 (diff)
downloaddrakwizard-19dbaff6332ba151e7b14eb7029926c5f2f1bcbe.tar
drakwizard-19dbaff6332ba151e7b14eb7029926c5f2f1bcbe.tar.gz
drakwizard-19dbaff6332ba151e7b14eb7029926c5f2f1bcbe.tar.bz2
drakwizard-19dbaff6332ba151e7b14eb7029926c5f2f1bcbe.tar.xz
drakwizard-19dbaff6332ba151e7b14eb7029926c5f2f1bcbe.zip
add mapping between unixgroup and ntgroup
Diffstat (limited to 'samba_wizard/Samba.pm')
-rwxr-xr-xsamba_wizard/Samba.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index 6f7985e1..83dbecfb 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -437,6 +437,17 @@ EOF
append_to_file($wiz_samba_etc, "type=$type\n");
}
+sub map_unxigroup_ntgroup {
+ my $conf = "/etc/group";
+ my @groups;
+ foreach (cat_($conf)) {
+ push @groups, $1 if m/^([^#:]+):[^:]+:([^:]+):/ and $2 > 499;
+ }
+ foreach (@groups) {
+ system("net groupmap add unixgroup=$_ ntgroup=$_");
+ }
+}
+
sub write_conf_restart_smb {
$samba->write_conf("/etc/samba/smb.conf");
if (services::is_service_running('smb')) {
@@ -456,6 +467,7 @@ sub do_it {
# add special global options
global_special_options;
+ map_unxigroup_ntgroup;
# log level in global section
$o->{var}{wiz_log_file} and $samba->{global}{'log file'} = $o->{var}{wiz_log_file};