Section 2.1. Binary Packages

2.1. Binary Packages

Samba is so popular with Unix/Linux administrators that many vendors include prepackaged versions in their operating system distributions. There are advantages to using software packages, one of which is that you do not have to bother with the details of compiling the software itself. The main drawback is that you are dependent on the options the vendor chose when building Samba. It is also likely that the server will be slightly behind the current production Samba release, because vendors tend to upgrade packages only when there is a strong reason, such as a widely experienced bug or security issue. On the other hand, you can be fairly sure that a bundled version has been installed properly, and perhaps it will take only a few simple modifications to your smb.conf file for you to be up and running. Samba is mature enough that you probably don't need the latest release to meet your basic needs, so you might be perfectly happy running a bundled version.

If you choose this option, be aware that your Samba files, including the very important smb.conf, will likely be stored somewhere other than the default locations used by Samba when it has been built from source. For example, with most Linux distributions, smb.conf and some other Samba-related files are in the /etc/samba directory. The default location when building from source is /usr/local/samba/lib.

If Samba is already installed on your system, you can check which version you have by using the command:

 $ smbd -V Version 3.0.12 

If you receive a message back similar to "command not found," either Samba is not installed or smbd is not in your shell's search path. In the latter case, use the find command to locate the smbd executable.

 $ find / -name smbd -print /opt/samba/sbin/smbd 

You might also be able to use a system-specific tool to query a software-package maintenance utility for the location of the Samba programs. On RPM-based systems such as Red Hat Enterprise Linux and Novell's SUSE Linux, you can use the rpm command to query the installed packages for Samba. In this example, Samba has been split between multiple packages.

 $ rpm -qa | grep samba samba-3.0.12-5 samba-client-3.0.12-5 samba-common-3.0.12-5 

Other platforms will most likely have similar toolsets for querying installed software packages. For example, Solaris includes the pkginfo application and Debian Linux provides dpkg . If you are unsure which tools are available, check your server's operating system documentation.

It is possible to determine certain information about Samba's build using the -b option. This option instructs smbd to print its list of compile-time values for items such as directory search paths. The -b option can produce several screens of data. So unless you can read extremely fast, it is best to pipe the output to a file, page through it with a pager utility such as less or more, or simply grep the information you need. The following example shows that smbd expects its configuration file to be found in the /etc/samba directory.

 $ smbd -b | grep CONFIGFILE    CONFIGFILE: /etc/samba/smb.conf 

Even if a vendor does not include Samba with the operating system, precompiled binary packages are available for a large number of platforms. These packages are often maintained by members of the Samba community for the purpose of saving you a fair amount of time and trouble. The best place to begin when looking for installable Samba packages is Here you will find either the packages themselves or links to sites that do provide them.

When using a package from a third party, it is vital to ensure that the correct libraries required by the executables are also installed. If your system does not already have the required version of a library, you might have to install a new version.

Package managers such as RPM provide dependencies checks to ensure that all of the necessary libraries for a piece of software are available before the software can be installed. If your software packaging system does not support this feature, many systems with shared libraries do come with a tool called ldd. This tool tells you which libraries a specific binary requires and which libraries on the system satisfy that requirement. For example, checking the smbd program on our test machine gave us:

 $ ldd /usr/local/samba/sbin/smbd =>  (0xffffe000) => /usr/lib/ (0x40019000) => /usr/lib/ (0x4004b000) => /usr/lib/ (0x40058000) => /usr/lib/ (0x4006f000) => /usr/lib/ (0x400e2000) => /lib/ (0x40120000) => /usr/lib/ (0x40124000) => /usr/lib/ (0x40141000) => /usr/lib/ (0x40171000) => /lib/ (0x40264000) => /lib/ (0x40279000) => /lib/ (0x402ab000) => /lib/ (0x402b4000) => /lib/ (0x402c7000) => not found => /lib/tls/ (0x402d3000) => /usr/lib/ (0x403ec000) => /usr/lib/ (0x40401000)   /lib/ (0x40000000) 

If there are any incompatible (or missing) libraries at this stage, the distribution-specific documentation should highlight them. In this example, the popt library cannot be found. This type of problem usually occurs for one of two reasons: either the library is not present on the system or the library is present but is stored in a location outside the runtime library search path. The solution to the first problem is simple: install the missing library. The solution to the second issue is platform- dependent. For example, on Linux, you can edit /etc/ to add directories to the search path for the run time linker, and on Solaris, you can use the crle tool to perform a similar function.

Using Samba
Using Samba: A File and Print Server for Linux, Unix & Mac OS X, 3rd Edition
ISBN: 0596007698
EAN: 2147483647
Year: 2004
Pages: 135 © 2008-2017.
If you may any questions please contact us: