This is outdated, and nobody uses it Signed-off-by: Michael Tremer --- html/cgi-bin/samba.cgi | 119 +++++------------------------------------ 1 file changed, 13 insertions(+), 106 deletions(-) diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 902ae6eac..2c2c506e5 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -93,7 +93,6 @@ my $LOGLINES = '50'; ################################################## Samba PDC Variablen ##################################################### $sambasettings{'LOCALMASTER'} = 'off'; -$sambasettings{'DOMAINMASTER'} = 'off'; $sambasettings{'PREFERREDMASTER'} = 'off'; my $PDCOPTIONS = `cat ${General::swroot}/samba/pdc`; @@ -152,7 +151,6 @@ delete $sambasettings{'__CGI__'};delete $sambasettings{'x'};delete $sambasetting if ($sambasettings{'PASSWORDSYNC'} eq 'on'){ $sambasettings{'PASSWORDSYNC'} = "true";} else { $sambasettings{'PASSWORDSYNC'} = "false";} if ($sambasettings{'LOCALMASTER'} eq 'on'){ $sambasettings{'LOCALMASTER'} = "true";} else { $sambasettings{'LOCALMASTER'} = "false";} -if ($sambasettings{'DOMAINMASTER'} eq 'on'){ $sambasettings{'DOMAINMASTER'} = "true";} else { $sambasettings{'DOMAINMASTER'} = "false";} if ($sambasettings{'PREFERREDMASTER'} eq 'on'){ $sambasettings{'PREFERREDMASTER'} = "true";} else { $sambasettings{'PREFERREDMASTER'} = "false";} if ($sambasettings{'WIDELINKS'} eq 'on'){ $sambasettings{'WIDELINKS'} = "yes";} else { $sambasettings{'WIDELINKS'} = "no";} if ($sambasettings{'UNIXEXTENSION'} eq 'on'){ $sambasettings{'UNIXEXTENSION'} = "yes";} else { $sambasettings{'UNIXEXTENSION'} = "no";} @@ -197,7 +195,6 @@ winbind use default domain = yes logging = syslog preferred master = $sambasettings{'PREFERREDMASTER'} -domain master = $sambasettings{'DOMAINMASTER'} local master = $sambasettings{'LOCALMASTER'} END ; @@ -215,27 +212,9 @@ printable = yes END close FILE; -if ($sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'true' ) - { - open (FILE, ">${General::swroot}/samba/pdc") or die "Can't save the pdc settings: $!"; - flock (FILE, 2); - chomp $sambasettings{'PDCOPTIONS'}; - $sambasettings{'PDCOPTIONS'} =~ s/\r\n/\n/gi; - $sambasettings{'PDCOPTIONS'} =~ s/^\n//gi; - $sambasettings{'PDCOPTIONS'} =~ s/^\r//gi; - $sambasettings{'PDCOPTIONS'} =~ s/^.\n//gi; - $sambasettings{'PDCOPTIONS'} =~ s/^.\r//gi; - print FILE < $Lang::tr{'basic options'} $Lang::tr{'workgroup'} -print <
Wide linkson / off @@ -346,7 +321,6 @@ print <$Lang::tr{'security options'} $Lang::tr{'security'} @@ -377,25 +351,12 @@ if ($sambasettings{'SECURITY'} eq 'user') print <$Lang::tr{'local master'}on / off -$Lang::tr{'domain master'}on / - off $Lang::tr{'prefered master'}on / off END ; } -if ($sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'on') - { - print <
- $Lang::tr{'pdc options'} -
- -END -; - } - print <
@@ -430,14 +391,7 @@ END if ($sambasettings{'SECURITY'} eq 'user') { - if ($sambasettings{'DOMAINMASTER'} eq 'off') - { - &Header::openbox('100%', 'center', $Lang::tr{'accounting user nonpdc'}); - } - else - { - &Header::openbox('100%', 'center', $Lang::tr{'accounting user pdc'}); - } + &Header::openbox('100%', 'center', $Lang::tr{'user management'}); print <
@@ -448,15 +402,7 @@ if ($sambasettings{'SECURITY'} eq 'user') END ; - if ($sambasettings{'DOMAINMASTER'} eq 'off') - { - print ""; - } - else - { - print "$Lang::tr{'type'}"; - } - + print ""; print "$Lang::tr{'status'}$Lang::tr{'options'}"; system('/usr/local/bin/sambactrl readsmbpasswd'); open(FILE, "<${General::swroot}/samba/private/smbpasswd") or die "Can't read user file: $!"; @@ -480,21 +426,7 @@ END print "$Lang::tr{'set'}"; } - if ($sambasettings{'DOMAINMASTER'} eq 'off') - { - print ""; - } - else - { - if ($userline[0] =~ /\$/) - { - print "$Lang::tr{'pc'}"; - } - else - { - print "$Lang::tr{'user'}"; - } - } + print ""; if ($userline[4] =~ /D/) { @@ -537,28 +469,14 @@ END ; } - if ($sambasettings{'DOMAINMASTER'} eq 'on' && $userline[0] =~ /\$/) - { - print <
- - - -
-END -; - } - else - { - print <
- - - -
+ print <
+ + + +
END ; - } $lines++; } print <
- -
-END -; - } print <
@@ -930,9 +839,7 @@ if ( $smb eq 'shares') close FILE; -if ( $sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'true' ){system("/usr/local/bin/sambactrl smbsafeconfpdc");} - else{system("/usr/local/bin/sambactrl smbsafeconf");} - +system("/usr/local/bin/sambactrl smbsafeconf"); system("/usr/local/bin/sambactrl smbreload"); refreshpage(); } -- 2.20.1