Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
This chapter is from the book

Compiling Samba

After obtaining the source code distribution of Samba, you must decide what nondefault features, if any, should be enabled when you compile the software.

Beginning with release 2.0, Samba began to use the GNU autoconf system for determining the capabilities of the host system on which it is compiled. This means that current Samba distributions can be built by executing the following three commands within the extracted source/ subdirectory.

root# ./configure
root# make
root# make install

However, many options that may suit your particular needs are available for the configure script. Table 3.3 briefly describes the most common nondefault options. For a complete listing of all available options, the configure script supports a --help option, as shown here.

root# ./configure --help
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
  --cache-file=FILE       cache test results in FILE

[remaining output deleted...]

Table 3.3  Common Nondefault Samba Configuration Options





Enable debugging information when building Samba programs.



Define the top-level directory to use when installing the Samba files. The default is /usr/local/samba/.



Include support for managing file-system ACLs, such as the ones used by the Windows NT Explorer Security Tab on File Properties, via the SMB command. This requires the server's OS to support ACLs on the file system.



Enable support for Samba binary placement that is compliant with the Filesystem Hierarchy Standard (FHS). A fully FHS-compliant package also requires that other flags be set.



Enable authentication, account, and session management via PAM.



Enable building the pam_smbpass.so library.



Enable support for acting as a Microsoft DFS root server.



Enable support for interacting with server file-system quotas.



Enable building the user-space tools for mounting and unmounting smbfs file systems. This option is available only on Linux systems.



Enable support for using SSL to encrypt SMB sessions.



Enable writing log information via the syslog facility rather than the default individual log files.



Enable logging user connections via the utmp facility.



Enable support for pluggable per-share VFS modules.


Instead of the original installation instructions (./configure, make, make install), to enable logging via syslog and support for interacting with file-system quotas, use these instructions:

root# ./configure --with-syslog --with-quotas
root# make
root# make install

The Filesystem Hierarchy Standard (--with-fhs)

A few comments should be made regarding the --with-fhs option. Most binary Samba packages now enable this option in the distribution. By default, all Samba programs and related configuration files are placed in the directory /usr/local/samba/. The --with-fhs option simply creates an FHS-compliant directory structure below /usr/local/samba/.

To place the various Samba files in a truly FHS compliant fashion, a few more options need to be defined, as shown here:

root# ./configure --prefix=/usr 
        --with-swatdir=/usr/share/swat \
  • + Share This
  • 🔖 Save To Your Account