In the previous three chapters, we showed you how to install Samba on a Unix server and set up Windows clients to use a simple disk share. This chapter will show you how Samba can assume more productive roles on your network.
nmbd, are controlled through a single ASCII file,
smb.conf, that can contain over 200 unique options. These options define how Samba reacts to the network around it, including everything from simple permissions to encrypted connections and NT domains. The next five chapters are designed to help you get familiar with this file and its options. Some of these options you will use and change frequently; others you may never use - it all depends on how much functionality you want Samba to offer its clients.
This chapter introduces the structure of the Samba configuration file and shows you how to use these options to create and modify disk shares. Subsequent chapters will discuss browsing, how to configure users, security, domains, and printers, and a host of other myriad topics that you can implement with Samba on your network.
Here is an
example of a Samba configuration file. If you have worked with a Windows .INI file, the structure of the
smb.conf file should look very familiar:
log level = 1
max log size = 1000
socket options = TCP_NODELAY IPTOS_LOWDELAY
guest ok = no
browseable = no
map archive = yes
path = /usr/tmp
guest ok = yes
printable = yes
min print space = 2000
browseable = yes
read only = yes
guest ok = yes
path = /export/samba/test
Although you may not understand the contents yet, this is a good configuration file to grab if you're in a hurry. (If you're not, we'll create a new one from scratch shortly.) In a nutshell, this configuration file sets up basic debug logging in a default log file not to exceed 1MB, optimizes TCP/IP socket connections between the Samba server and any SMB clients, and allows Samba to create a disk share for each user that has a standard Unix account on the server. In addition, each of the printers registered on the server will be publicly available, as will a single read-only share that maps to the
/export/samba/test directory. The last part of this file is similar to the disk share you used to test Samba in Chapter 2,
Installing Samba on a Unix System.