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]
Configuration:
  --cache-file=FILE       cache test results in FILE

[remaining output deleted...]

Table 3.3  Common Nondefault Samba Configuration Options

Option

Description

Hour

--enable-debug

Enable debugging information when building Samba programs.

13

--prefix=<dir>

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

3

--with-acl-support

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.

14

--with-fhs

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.

3

--with-pam

Enable authentication, account, and session management via PAM.

16

--with-pam_smbpass

Enable building the pam_smbpass.so library.

16

--with-msdfs

Enable support for acting as a Microsoft DFS root server.

14

--with-quota

Enable support for interacting with server file-system quotas.

8

--with-smbmount

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

12

--with-ssl

Enable support for using SSL to encrypt SMB sessions.

17

--with-syslog

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

4

--with-utmp

Enable logging user connections via the utmp facility.

16

--with-vfs

Enable support for pluggable per-share VFS modules.

24

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-fhs 
        --libdir=/etc/samba 
        --with-configdir=/etc/samba 
        --localstatedir=/var 
        --with-lockdir=/var/lock/samba 
        --with-codepagedir=/usr/share/samba/codepages 
        --with-swatdir=/usr/share/swat \
  • + Share This
  • 🔖 Save To Your Account