Dancing the SAMBA: An Introduction to Living with Windows
Samba as a Server
The easiest way to configure samba as a server is to use the SWAT wizard(local link) to
create an smb.conf file. You can then fine-tune the settings
with SWAT. I will cover here a few important settings, that you would
most likely want to set:
- netbios name sets the "computer name"
that would be assigned to your server. This defaults to the first part
of your hostname, but may be set to any value.
- workgroup sets the workgroup your
computer is listed in. This affects network browsing and defaults to
"WORKGROUP" which is OK for a private network.
- server string is the comment for the
server that is viewable while browsing.
- interfaces specifies what network
interfaces, or netmask to listen on. If your network is connected to
the Internet, specify your local interface only in this option. For
- security defines what security model
Samba should use.
- If set to SHARE, every share has one password, with no regard
to users. Note however, that a UNIX user is still required. Use this
mode if your users do not have local accounts on the server.
- If set to USER, a user needs to login with a username and
password, and then gets access to shares according to server
configuration. The user's account is used to access the files on the
- Other options exist, but should not interest home users.
- log level is a very useful option for
debugging. The higher the value, the more information is logged. See
the documentation for more sub-options. You can find the log files at /var/log/samba/.
- wins support enables your Samba server
to act as a WINS server in your routed network. Set this option to yes
only if you have a routed local network, and your Samba machine is the
main server. The WINS server allows machines to find each other even on
routed networks. You should never have more than one machine acting as
a WINS server.
- wins server specifies the IP address of
an external WINS server (running either Samba or Windows). Set this if
you are on a routed network, and have a WINS server configured.
- guest account specifies the account to be
used for guest access (defaults to nobody).
- map to guest specifies when to fallback
to guest access, as opposed to denying access. Set to "Bad User" to
allow guest access when the username is invalid.