Appendix D. Downloading Samba with CVS

In Chapter 2 we showed you how to download the latest stable version of Samba published by the Samba developers. For most purposes (including virtually all production servers) this procedure will meet your needs. However, sometimes you might want to run a version of Samba that includes the latest bug fixes and features, maybe for research and testing purposes, or just to see what the Samba developers have been up to lately.

The Samba team keeps the latest updates of the Samba source code in a Concurrent Versions System (CVS) repository. CVS is a freely available configuration management tool and is distributed under the GNU General Public License. You can download the latest copy from The Samba team describes various ways to access its CVS repository at


Although the CVS code contains the latest features, it also contains the latest bugs and sometimes won't even compile properly! If you prefer a less "bleeding edge" release, try looking in the alpha and pre directories on the Samba FTP server. The alpha directory contains alpha releases, and the pre directory contains (usually more stable) prerelease versions. (See Chapter 2 for information on downloading via FTP.) Alpha releases might be a little behind the latest CVS code, but are less buggy and usually compile properly on the more common Unix versions.

One of the nicest things about CVS is its ability to handle remote logins. This means that people across the globe on the Internet can download and update various source files for any project that uses a CVS repository. Such is the case with Samba. Once you have CVS installed on your system, you must first log in to the Samba source server with the following command:

$ cvs -d login

When you are prompted for a password, enter cvs. You are connected to the CVS server at Once you are connected, you can download the latest source tree with the following command:[1]

$ cvs -z5 -d co samba

This downloads the entire Samba distribution (file by file) into a directory called samba, created in your current directory. The samba directory has the same structure as the Samba source distribution described in Chapter 2, except that it has additional directories named CVS throughout the source tree. These directories are used by CVS to store information about each file in the source tree and how to update them. After the download is completed, you can follow the instructions in Chapter 2 to configure, compile, and install your new Samba release.

The Samba developers typically update the Samba source code one or more times per day. Whenever you want to catch up to the latest changes, simply cd to the samba directory and run the following command:

$ cvs update -d -P

Each time you do this, you will need to reconfigure, recompile, and reinstall to update your installation as we showed you in Chapter 2.


[1] The -z option causes the transfer to be made in GNU gzip compressed format and requires the gzip program to be installed on your system to work. If you do not have gzip, omit the -z option.