4.4. Basic Server ConfigurationWe now start from scratch and build a configuration file for a new Samba server. Our goal is to create a working server and to examine the options that are important for basic functionality. The server will export a single share named [data] . First, we'll introduce three configuration options that should appear in the [global] section of our smb.conf file:
[global]
# Server configuration parameters
netbios name = PIGEON
workgroup = GARDEN
server string = Engr Dept Server (Samba %v)
encrypt passwords = yes
security = user
This configuration file is pretty simple; it advertises the Samba server under the NetBIOS name
PIGEON
. In addition, it places the system in the
GARDEN
workgroup and displays a description to
Because this is a
Figure 4-2. Browsing the GARDEN workgroup and viewing the Samba server PIGEON
You can verify the
server string
by either viewing the properties of the Samba host (right-clicking the server icon to launch the context menu and selecting the Properties option), or enabling the details listing of
Figure 4-3. Viewing the properties of a CIFS server
If you were to click the PIGEON icon, a window would appear that shows the services that it provides. In this case, with the exception of the built-in Printers and Faxes icon, the window would be completely empty, because there are no shares defined on the server yet. 4.4.1. Server Configuration OptionsTable 4-4 summarizes the server configuration options previously used. All three of these options are global in scope, so they must appear in the [global] section of the configuration file. Table 4-4. General server options
4.4.1.1. netbios nameThe netbios name option allows you to set the NetBIOS name of the server. For example: netbios name = YORKVM1
The default value for this configuration option is the server's hostnamethat is, the first part of its fully qualified domain name. For example, a system with the DNS name
public.example.com
would be given the NetBIOS name
PUBLIC
by default. Although you can use this option to
Changing the NetBIOS name of the server is not recommended without a good reason. One such reason might be if the hostname of the system is not unique because the LAN is divided over two or more DNS domains. For example, YORKVM1 is a good NetBIOS candidate for vm1.york.example.com to differentiate it from vm1.falkirk.example.com , which has the same hostname but resides in a different DNS domain.
Another use of this option is to relocate SMB services from a dead or
4.4.1.2. workgroupThe workgroup parameter sets the current workgroup (or domain, as you will see in Chapter 9 and Chapter 10) in which the Samba server will advertise itself. Clients that wish to access shares on the Samba server should be in the same NetBIOS group. Remember that workgroups are really just NetBIOS group names and must follow the standard NetBIOS naming conventions outlined in Chapter 1. The default option for this parameter is set at compile time to WORKGROUP . Because this is the default workgroup name of every unconfigured Samba system, we recommend that you always set your workgroup name in the smb.conf file. When choosing your workgroup name, make sure to avoid duplicating a name of an existing server or user. [*]
4.4.1.3. server string
The
server string
parameter defines a descriptive comment string that will be associated with the server. You can use
[global]
server string = Engr Dept Server (Samba %v)
The default for this option simply
server string = Samba %v |