diff options
-rwxr-xr-x | samba_wizard/Samba.pm | 12 |
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}; |