This is going to be a long section. The configuration of Samba requires some understand of what it can do. With a Debian based system, the configuration of SMB is all contained in /etc/samba/smb.conf. A default file is already set up when the package samba is installed. The configuration file is commented, so you can read it and learn more about how to set up a SMB server.
Furthermore, you can also use the following command to learn more about setting the configuration file.
Besides these resources, let us examine various aspects of using Samba.