A Basic Samba Configuration File
The
key to configuring Samba is its configuration file,
smb.conf. This configuration file can be very
simple or extremely complex, and the rest of this book is devoted to
helping you get deeply personal with this file. For now, however,
we’ll show you how to set up a single file service,
which will allow you to fire up the Samba daemons and see that
everything is running as it should be. In later chapters, you will
see how to configure Samba for more complicated and interesting
tasks.
The installation process does not automatically create an
smb.conf configuration file, although several
example files are included in the Samba distribution. To test the
server software, though, we’ll use the following
file, which you can create in a text editor. It should be named
smb.conf and placed in the
/usr/local/samba/lib directory:[9]
[global]
workgroup = METRAN
[test]
comment = For testing only, please
path = /usr/local/samba/tmp
read only = no
guest ok = yesThis brief configuration file tells the Samba server to offer the
/usr/local/samba/tmp directory on the server as
an SMB share called test. The server also becomes part of the METRAN workgroup, of which each client must also be a part. If you have already chosen a name for your own workgroup, use the name of your workgroup instead of METRAN in the previous example. In case you are connecting your Samba system into an existing network and need to know the workgroup name, you can ask another system administrator ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access