Very often, while wading through mail on the various Samba mailing lists or newsgroups, I come across a message like this:
"I'm running Samba version 1.9.16p4 and I can't get ____ to work."
Invariably the answer is,
"Upgrade to the latest version, and if it still doesn't work, post your question again."
It is important to realize the rate at which code develops and changes, especially in an open source software project such as Samba. The reported problem might be a known bug that has already been fixed.
Perhaps you are installing Samba for the first time or maybe taking over for someone who previously maintained your servers. Whatever the reason, sooner or later you will need to obtain a copy of the latest Samba source code and compile it yourself. In fact, you might even find that it's something you look forward to.
In this hour we provide the information necessary to download the latest Samba source code distribution and compile the various tools yourself. We also take a look at the various precompiled binary packages that are available in case you don't feel like compiling source on your own.
Download Sites and Methods
The first place to look for the latest Samba source code release is one of the official mirror sites listed at http://samba.org. Once you have chosen a mirror site, select the download link from the page header. The resulting page will have a link for downloading a file named samba-latest.tar.gz, the most recent stable release of Samba.
If you prefer to browse and see what is available, links to directories are available on the same download page for use with Web browser or via anonymous FTP. Again, you should see a file named samba-latest.tar.gz in the directory listing. If not, simply look for the file samba-#####.tar.gz with the highest version number.
After downloading the distribution, change to a temporary directory where you won't overwrite anything and extract the source files. The directory /usr/local/src is often used for the purpose of compiling source code. To extract the files, you need a working version of GNU gzip and tar. If the file you download is named samba-latest.tar.gz, for example, the following command extracts the files for you:
$ gzip -dc samba-latest.tar.gz | tar xvf -
Although the directory tree might change from time to time, three directories are common to all versions thus far:
docs/This directory contains various documents, such as man pages, HTML files, and ASCII HOWTO files.
examples/This directory contains various examples for many operating systems describing different setup possibilities, primarily sample smb.conf files.
source/This directory contains the Samba source code tree for the distribution.