Common Samba Configuration Options
The [global] section of the smb.conf file contains an extensive list of possible configuration options.
For a complete list type [testparm]. This command will parse the smb.conf file and in addition to looking for syntax error, will list all possible configuration options and their current value. It will allow you to test whether Samba is recognizing your configured values, and what default values are being used. Many of the options in the smb.conf file are meant to be used together in different configuration scenarios. Some options, such as [password server], are only valid when other options are present or set to specific values. In the case of the [password server] option, it is only valid when the [security] option is set to [server] or [domain].
Common Sharepoint Configurations
Any directory on your Linux system can be shared. The heading for each section other than [global] is treated as a share by Samba and if properly configured is made available to SMB clients. Below is a list of common share configuration options.
Gaining Access to a Samba Server
There are several ways that a Samba server can be configured to allow a user access to shares. All methods generally involve some form of validation in which the users credentials are compared to a list of those granted access. This list can be stored in one of two places, either on the Samba server itself, or on the network as part of a Windows Domain or Server.
The simplest setup is to maintain an account database of those users that are allowed to use Samba. The list of these users is stored in the /etc/samba/smbusers file. Each user is assigned a password that is specific to Samba and may even be different than the password the user uses to log on. This is referred to as the SMB password and is stored in the /etc/samba/smbpasswd file. Before a Samba user can be created, you must first create a standard logon using the [adduser] command. Once the user account has been created and a password set, you can run [smbadduser].
Consider the following command sequence:
This command sequence creates the Linux user mary and sets a password, it then adds that user mary to Samba, with an NT alias of smbmary and sets the Samba specific password. In this example the NT alias serves no functional purpose, as we are using the user account database stored on the Linux server. The sample smb.conf file listed above would work in this example. When the user attempts to connect to a share, the user would enter their Linux user ID and Samba password to gain access. Again, this password may be different than the Linux password the user would use if they logged on locally.