Configuring Samba
For samba to properly operate, you must create a samba configuration
file. One is not installed by default, it must be created by hand. There
are several hundred possible options which be used, all of them documented
in the smb.conf man page (also available online at www.samba.org).
The samba configuration file defines a set of options on a global and
share basis. The basic layout is:
[global]
; this is a comment
# also a comment
options...
[share]
options
The words in brackets are share names. There are three special share
names which you should be aware of.
- [global]
This share defines global options that are applied to every share
unless they are overridden
- [homes]
This is a special share that allows uses to access thier home
directory. When a client requests a share from Samba without specifying a
share name, Samba will check to see if the client connecting is a valid
user. If they are, samba will return their home directory based on the options
defined in the homes share.
- [printers]
If a requested share does not exist, and is not a valid username on
the system, then Samba will check to see if it is a printer name as defined
in /etc/printcap. This makes it possible to allow users access to any file
with a valid printer capabilities entry without manually setting up each
printer. It is important to note the order here, since the homes share is
checked first, a printer with the same name as a valid user will
never be able to be accessed.