Download Managing Linux Systems with Webmin

Transcript
556
Chapter
43 • Windows File Sharing with Samba
43.2 The Samba Windows File Sharing Module
This Webmin module allows you to specify directories and printers to be shared to Windows clients using the SMB protocol. It can be found in the Servers category, and when its icon is
clicked on the main page (as shown in Figure 43.1) it will be displayed. All existing shares are
listed, along with their paths and the users to whom they are available. Below them are icons for
setting various global options that apply to all shares, links for managing Samba users, and a
button for starting or restarting the server processes.
Over the years, Samba has gained a vast array of configurable options. This module does not
allow you to configure all of them though, only the ones that are useful for a small server on a simple network. For example, settings related to login scripts, NT domains, and SSL cannot be edited.
If you add them to your smb.conf file manually, however, the module will not touch them.
Like all other modules that configure some server, this one can only be used if the Samba
server is actually installed. If the module cannot find it, an error message like The Samba
server executable /usr/sbin/smbd was not found will appear on the main page instead. If you
do have Samba installed but in a different location than what the module expects, see Section
43.18 “Configuring the Samba Windows File Sharing Module” for instructions on how to reconfigure it to use the correct paths. Otherwise, you will need to install it.
Most Linux distributions, and several other operating systems, include a Samba package or
packages, which can be easily installed using the Software Packages module (covered in
Chapter 12). If not, you will need to download the source code from www.samba.org and compile and install it manually. The module expects you to use the package, if one is available, or the
source code otherwise, so if you did not and an error message is still being displayed on the main
page, the module’s configuration will need to be adjusted to use the right paths.
No matter how Samba is installed, its default configuration file will include at least two
shares (the special homes and printers), as well as several global settings. This means that
even if you have never used this module before or configured Samba manually, the list on the
main page will not be empty. Of course, if you have been adding shares by directly editing the
configuration file, they will be displayed as well.
If Webmin detects that Samba is already running, a button labeled Restart Samba Servers
will be displayed at the bottom of the page. Predictably, clicking it will kill all running server
processes and restart them, forcing the currently configuration to be reloading. This is usually
unnecessary, though, as Samba will reread the configuration files as soon as it detects that they
have been changed.
If the module finds that both of the Samba server processes are not running, it will display
the Start Servers buttons, which, when clicked, will run both smbd and nmbd. No PID file is
checked to determine if they are running or not. Instead, the module searches for running processes with those names.
43.3 Managing Samba Users
As mentioned in the introduction, the SMB protocol uses a password encryption format that is
incompatible with the standard UNIX format. This was not originally a problem, as old versions
of Windows (95 and earlier) sent unencrypted passwords to SMB servers. This allowed Samba
to encrypt and verify them against the UNIX password list, just like the FTP or telnet servers do.
Unfortunately, recent Windows releases will only send passwords in the new NTLM encrypted