diff --git a/samba/CHANGELOG b/samba/CHANGELOG index 2eeb3d64a..3a2ce3a10 100644 --- a/samba/CHANGELOG +++ b/samba/CHANGELOG @@ -28,3 +28,5 @@ Fix list of users for a share to show open files correctly, and not show the sam Try to use the smbpasswd command to create or delete users, if installed. ---- Changes since 1.520 ---- Add support for the locked account flag for users, thanks to Juan Miguel Corral Cano. +---- Changes since 1.550 ---- +Added improved Winbind support, thanks to Caspar Smit. diff --git a/samba/conf_bind.cgi b/samba/conf_bind.cgi index 88ab91d16..c35af943a 100755 --- a/samba/conf_bind.cgi +++ b/samba/conf_bind.cgi @@ -37,6 +37,11 @@ print "",&ui_radio("groups", &istrue("winbind enum groups") ? 1 : 0, [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"\n"; +print " $text{'bind_defaultdomain'}\n"; +print "",&ui_radio("defaultdomain", + &istrue("winbind use default domain") ? 1 : 0, + [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"\n"; + print " $text{'bind_realm'}\n"; printf "\n", &getval("realm"); diff --git a/samba/config-debian-linux b/samba/config-debian-linux index 4c395bd95..5e433f657 100644 --- a/samba/config-debian-linux +++ b/samba/config-debian-linux @@ -5,6 +5,7 @@ samba_password_program=/usr/bin/smbpasswd samba_status_program=/usr/bin/smbstatus samba_server=/usr/sbin/smbd name_server=/usr/sbin/nmbd +winbind_server=/usr/sbin/winbindd smb_conf=/etc/smb.conf text_lists=0 run_from_inetd=1 diff --git a/samba/config.info b/samba/config.info index ac9b9fc64..de4b7b07d 100644 --- a/samba/config.info +++ b/samba/config.info @@ -8,9 +8,12 @@ samba_status_program=Full path to smbstatus,0 samba_password_program=Full path to smbpasswd,0 samba_server=Full path to smbd,0 name_server=Full path to nmbd,0 +winbind_server=Full path to winbindd,0 swat_path=Full path to swat,3,None smbgroupedit=Full path to smbgroupedit,3,None pdbedit=Full path to pdbedit,3,None net=Full path to net command,3,None start_cmd=Command to start Samba servers,3,Automatic stop_cmd=Command to stop Samba servers,3,Just kill processes +start_cmd_wb=Command to start Winbind servers,0 +stop_cmd_wb=Command to stop Winbind servers,0 diff --git a/samba/index.cgi b/samba/index.cgi index 84ed68d23..3f08efa3a 100755 --- a/samba/index.cgi +++ b/samba/index.cgi @@ -276,6 +276,24 @@ if ($access{'apply'}) { $text{'index_stopmsg'}); } print &ui_buttons_end(); + if (&has_command("winbindd")) { + $isrun2 = &is_winbind_running(); + print &ui_hr(); + print &ui_buttons_start(); + if ($isrun2 == 0) { + # Start button + print &ui_buttons_row("start_wb.cgi", $text{'index_start_wb'}, + $text{'index_startmsg_wb'}); + } + elsif ($isrun2 == 1) { + # Restart / stop buttons + print &ui_buttons_row("restart_wb.cgi", $text{'index_restart_wb'}, + $text{'index_restartmsg_wb'}); + print &ui_buttons_row("stop_wb.cgi", $text{'index_stop_wb'}, + $text{'index_stopmsg_wb'}); + } + } + print &ui_buttons_end(); } &ui_print_footer("/", $text{'index'}); diff --git a/samba/lang/en b/samba/lang/en index 4a4d39acf..3e9e51ebd 100644 --- a/samba/lang/en +++ b/samba/lang/en @@ -29,12 +29,18 @@ index_createprnshare=Create a new printer share. index_createcopy=Create a new copy. index_view=View all connections. index_start=Start Samba Servers +index_start_wb=Start Winbind Servers index_startmsg=The Samba servers do not appear to be running on your system. This means that the shares listed above will not be accessible to other computers. +index_startmsg_wb=The Winbind servers do not appear to be running on your system. index_restart=Restart Samba Servers +index_restart_wb=Restart Winbind Servers index_restartmsg=Click this button to restart the running Samba servers on your system. This will force the current configuration to be applied. +index_restartmsg_wb=Click this button to restart the running Winbind servers on your system. index_restartmsg2=This will also disconnect any connections to the server, so if you do not want the current configuration to be applied immediately you should just wait 1 minute until Samba reloads the configuration automatically. index_stop=Stop Samba Servers +index_stop_wb=Stop Winbind Servers index_stopmsg=Click this button to shut down the running Samba servers on your system. All currently logged in users will be forcibly disconnected. +index_stopmsg_wb=Click this button to shut down the running Winbind servers on your system. index_einclude=Warning - Your Samba configuration file $1 contains the $2 or $3 directive. This may cause Webmin to modify the file incorrectly. index_delete=Delete Selected Shares @@ -399,8 +405,10 @@ savesmb_server=You must enter a password server start_err=Failed to start Samba servers start_fail=$1 failed +start_err_wb=Failed to start Winbind servers restart_err=Failed to restart Samba servers +restart_err_wb=Failed to restart Winbind servers swats_fail=Failed to save username swats_user=Missing SWAT username @@ -422,8 +430,11 @@ viewu_kill=Disconnect Selected Users viewu_enone=No users selected log_apply=Restarted Samba servers +log_apply_wb=Restarted Winbind servers log_stop=Stopped Samba servers +log_stop_wb=Stopped Winbind servers log_start=Started Samba servers +log_start_wb=Started Winbind servers log_save_fshare=Modified file share $1 log_save_pshare=Modified printer share $1 log_save_sec=Modified security and access control for share $1 @@ -628,6 +639,7 @@ bind_local=Enable Winbind for local accounts? bind_trust=Trust domain server users? bind_users=Disallow listing of users? bind_groups=Disallow listing of groups? +bind_defaultdomain=Always use default domain? bind_realm=Kerberos realm on domain server bind_cache=Seconds to cache user details for bind_uid=Range of UIDs for Windows users diff --git a/samba/samba-lib.pl b/samba/samba-lib.pl index a234c8e23..589cfec42 100755 --- a/samba/samba-lib.pl +++ b/samba/samba-lib.pl @@ -734,6 +734,15 @@ return !$found_inet && !@smbpids && !@nmbpids ? 0 : !$found_inet ? 1 : 2; } +# is_winbind_running() +# Returns 0 if not, 1 if it is +sub is_winbind_running +{ +local (@wbpids); +@wbpids = &find_byname("winbindd"); +return !@wbpids ? 0 : 1; +} + # can($permissions_string, \%access, [$sname]) # check global and per-share permissions: # diff --git a/samba/save_bind.cgi b/samba/save_bind.cgi index 880c29333..145d204a0 100755 --- a/samba/save_bind.cgi +++ b/samba/save_bind.cgi @@ -21,6 +21,8 @@ $global = &get_share("global"); &setval("winbind enum groups", $in{'groups'} ? "yes" : "no"); +&setval("winbind use default domain", $in{'defaultdomain'} ? "yes" : "no"); + $in{'realm'} eq "" || $in{'realm'} =~ /^\S+$/ || &error($text{'bind_erealm'}); &setval("realm", $in{'realm'});