From 19dbaff6332ba151e7b14eb7029926c5f2f1bcbe Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Tue, 13 Sep 2005 10:20:50 +0000 Subject: add mapping between unixgroup and ntgroup --- samba_wizard/Samba.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'samba_wizard') 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}; -- cgit v1.2.1