Page 272 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 272
Network Operating Systems-I
notes The printers meta-service will origin every printer that is either specified in a printcap file, via
the lpstat, or via the CUPS API, to be published as a shared print queue. The printers stanza in
the smb.conf file can be set as not browseable. If it is set to be browseable, then it will be visible
as if it is a share. That makes no sense given that this meta-service is responsible only for making
UNIX system printers available as Windows print queues. If a comment parameter is specified,
the value of it will be displayed as part of the printer name in Windows Explorer browse lists.
Each section of the smb.conf file that states a share, or a meta-service, is called a stanza. The
global stanza specifies settings that affect all the other stanzas in the smb.conf file. Configuration
parameters are documented in the smb.conf man page. Some parameters can be used only in the
global stanza, some only in share or meta-service stanzas, and some can be used globally or just
within a share or meta-service stanza.
A minimal smb.conf contains a very minimal smb.conf.
Example of a minimal smb.conf
[global]
workgroup = WKG
netbios name = MYNAME
[share1]
path = /tmp
[share2]
path = /my_shared_folder
comment = Some random files
The configuration file for Samba is comparatively easy to interpret as there are ample comments
throughout the file for guidance. There are also some very well documented man pages available
to further assist with your configuration requirements.
The main Samba configuration file should be backed up before any settings are changed, so we
can at least restore a good file when problems occur.
[bash]# cp /etc/samba/smb.conf /etc/samba/smb.conf.original [bash]# vi /etc/samba/smb.
conf
The configuration file actually has one main section. The [global] section and its directives provide
all the options and parameters required for the Samba daemon (smbd) and NetBIOS daemon
(nmbd) to operate within the network. This (in a nutshell) is how your server will operate and be
seen on the network.
All other sections of the smb.conf file which are specified with square brackets “[something]”, is
start of a share definition and enclose all of the options and parameters that pertain only to the
resource that is being shared. Any directives that are specified within a share will override any
directives that are specified in the global section.
The following directives describe the start of the global configuration options and more
importantly, provides the options that identify the server on the network, they are the names for
your networking environment.
Example:
[global]
workgroup = WORKGROUP
266 LoveLy professionaL university