Electronic Review of Computer Books

[ ERCB Home | New | Feature | Brief | DDJ | Letters | Links ]

[an error occurred while processing this directive]

Vital Statistics

Title Samba: Integrating UNIX and Windows
Author John Blair
Publisher Specialized System Consultants, Inc. (SSC)
http://www.ssc.com/ssc/
Copyright 1998
ISBN 1-57831-006-7
Pages 298
Price $29.95
Title Teach Yourself Samba in 24 Hours
Authors Gerald Carter with Richard Sharpe
Publisher Sams Publishing
http://www.mcp.com/publishers/sams/
Copyright 1999
ISBN 0-672-31609-9
Pages 490
Price $24.99


Using LINUX in a Windows World

There are currently two books out on Samba (http://www.samba.org/), the open source software suite that provides file and print services to SMB/CIFS clients: Samba: Integrating UNIX and Windows, by John Blair, and Teach Yourself Samba in 24 Hours, by Gerald Carter with Richard Sharpe. The books have much in common: All three authors are Samba Team members, both books come with recent versions of Samba on CD-ROM (1.9.18p10 and 2.0.3, respectively), both are trade paperbacks, and both retail for around $24.00. Furthermore, both books have good, clear descriptions. For instance, compare the following discussion of the dead time parameter:

Excerpt from Samba: Integrating UNIX and Windows

dead time

Default: dead time = 0

Example: dead time = 15

An inactive client will consume server resources even though it is not doing anything. Each client has a corresponding server process that will consume memory and cpu time, even if idle. The dead time parameter accepts an integer value describing the number of minutes of inactivity before a session is automatically disconnected. The "dead time" is considered to begin when a client has no open files. This option stops the server from being bogged down by inactive connections. Since most clients have an auto-reconnect feature, this behavior is transparent. The default dead time of zero indicates that no client should ever be dropped because of inactivity. A time of five minutes is appropriate for most systems and will rarely be noticed by users.

Excerpt from Teach Yourself Samba in 24 Hours

dead time

This parameter enables you to set the number of minutes of inactivity before a connection (such as a smbd process) is considered dead and dropped. A connection is considered idle when there is no activity and it contains no open files. This can be helpful on a server that handles a large number of connections that are not always in use. My users have a tendency to log in and never log out, even when they go on vacation. Most modern clients have an automatic reconnect feature that makes this setting transparent to the user.

The default value of 0 indicates that the connection should never be dropped.

Default: dead time = 0

On my servers at work, I use a dead time of fifteen minutes.

Where the books differ is in their organization and origin. Blair's book is a beefed up version of the man pages that come with Samba and reads like a reference work. The man pages have been proof read by thousands of users and I found no errors. The Carter/Sharpe book, on the other hand, is organized as a tutorial. It was proof-read by a few editors. I found a half dozen typos, none serious, all in the early part of the book.

Both books are covering essentially the same content. Version 1.9.18p10 was the last version before 2.0.0, so version 2.0.3 is only four patch-level releases later. The most visible differences are: The default value of the security parameter changed from share to user, the build process now uses the GNU autoconf and automake tools, and the Samba Web Administration Tool (SWAT) went final (an alpha version was in 1.9.18p10). To update the earlier version, all I needed to do was to install the new binaries. No changes to the configuration file were needed.

Most people trying to setup Samba are replacing an existing Windows machine with a Linux box or turning a Windows machine into a dual-boot machine. They have users that need to print and to access shared disks. They need to get Samba up and running fast. My wife, for instance, is willing to tolerate my trying Linux as long as she can use the shared printer. I think it is reasonable to expect to have a working, equivalent Samba up and running in four hours (after the base operating system is installed). If binaries are available for your distribution, expect to cut off an hour.

Where these books differ is in how much reading you have to do before that 4-hour block when "the system will be down for scheduled maintenance." You need to read almost all of the Blair book before attempting to setup Samba. All of the reference material covering the multitude of configuration file parameters comes before any examples. The examples start on page 206 (of 298). The diagnostic procedures are in Chapter 11 (of 12). This is the DIAGNOSIS.txt file found in the Samba distribution, a feature I had occasion to use and found to be quite good.

In contrast, the Carter/Sharpe book covers "Installing and Testing the Configuration" in Hour 4 (of 24), starting on page 47 (of 498). This section covers an example configuration that can be all that is needed for some simple business environments. The book proceeds with more complex examples with the reference material for each parameter presented as introduced. If you like to just dive in and get something up and running, the Carter/Sharpe book is the one for you. If you have a more studied approach to system administration, either book is fine.

While the Blair book is nearly 300 pages, Carter/Sharpe's is almost 500. How are the extra 200 pages used? There are features common to both Samba versions that are just not covered in the Blair book: password synchronization (18 pages), the Secure Socket Layer (22 pages), other SMB clients (20 pages), and the SWAT package (18 pages). Where are the other 140 pages in the Carter/Sharpe book? In much better background material on Windows Networking and more examples. Blair assumes you already have a sysadmin's knowledge of Windows NT networking. For example, he introduces the NetBIOS Name Types notation of WORKGROUP<00> with just the comment "Values surrounded by < and > are hexadecimal representations." I got it in my head that the hex value in pointed brackets was a message type and wondered what relevance the actual value had to users. Carter and Sharpe make it clear that it is a name type, much like filename extensions are used in Windows. For example, for the default group WORKGROUP, all servers in the group register the name WORKGROUP<00> with the Name Service, all potential master browsers in the group register the name WORKGROUP<1E>, and all domain logon servers for the group register the name WORKGROUP<1C>.

One question to ask about a book is, "Is there a 'Wow' in it?" An example in the "Other SMB Clients" section of the Carter/Sharpe book wowed me. One of the authors is a sysadmin in a lab with 50 networked PCs. Each should have the same software on it. Over time, mistakes, crashes, and outright maliciousness corrupts the hard disk contents and it needs to be reloaded. Carter describes how to build a bootable MS-DOS floppy with the MS Network Client package included that can reload the entire hard disk over the network in 20 minutes. Now that is slick. There isn't much "Wow" to the Blair book.

I expect that reading Blair first contributed to my better understanding of the material in Carter/Sharpe. I know that reading Carter/Sharpe helped me understand what I had read and not understood very well or misunderstood in Blair.

What is there to not like about the Carter/Sharpe book? I found that it does not mention the "bind interfaces" parameter at all. Some of Carter's chapter introductions are a bit folksy. The introduction to "Security Levels and Passwords" reads:

After my weeklong vacation in Hour 4, "Installing and Testing the Configuration," I arrived back at work, and the boss pulled me aside. "These network drives you set up are great! Productivity has gone through the roof! I'd like to scale this setup company-wide, but before I can make the recommendation to management, I need some hard facts on the security of things. Can you explain to me how Samba checks my password when I log in?"

I stood there for a moment thinking. After a few silent moments, I said, "I'd be glad to sit down and explain how it all happens, but first I need an hour to get my morning cup of coffee and finish a few things."

"Sounds good," the boss replied. "I'll see you in an hour in my office." I started down the hall toward the testing lab trying to remember where I left my favorite coffee cup and my copy of this book.

How do these books wear with time? Both have good indexes, so finding the details of a half-remembered parameter or option is easy. The Blair book groups the parameter descriptions in big chunks that are logically related, so browsing for a needed parameter is easier. The table of contents is very extensive and browsing it is helpful for locating needed material by subject. The Carter/Sharpe book scatters the parameter reference material throughout the book. This makes for an easier first-time read but may hurt it as a reference. In the short time I have had both books, I haven't found this to be a major factor either way. Ask me in a year.

Where do both books fall down? Neither book explained the difference between the interfaces and socket address parameters in a way that I understood. It appears to hinge on the difference between binding to an interface and listening on a socket. I have done some sockets programming and still don't understand the distinction.

With the rise of Linux, Samba is also being used in home networks, an environment with its own special needs. Both books use Samba in business environments. Following the examples in the book leaves a dangerous security hole for any system accessible from the Internet. For example, our main computer at home is running Samba to share the printer with my wife's Windows 95 desktop. There is an ADSL connection to my ISP that is up continuously. Samba, by default, binds only to the "primary" interface.

Neither book defines primary. I want Samba to only face inward towards our private LAN, never outward towards the Internet. None of the example in either book cover this. The interface parameter can be used to explicitly direct Samba to a specific interface. The only example that mentions the interface parameter is in the Carter/Sharpe book and it is in connection with running multiple Samba servers on a single host. This flaw is not unique to these two books. Linux authors! Remember that many of the techies that introduce Linux into their workplace try it out first at home.

If you are not safely behind a firewall, add something like the following to your configuration file in the global section:

hosts allow = 192.168.0.0/24 # private network only
interface = 192.168.0.1 # private network interface address

Having covered the strengths and weaknesses of both Samba: Integrating UNIX and Windows and Teach Yourself Samba in 24 Hours, where do I come down? The Blair book isn't a bad book. If it was the worst technical book out there, the average would be raised immensely. The Carter/Sharpe book just is a very good book, I wish I had found it first. I am not above tossing a weak book that duplicates material from other sources. I'm keeping both. Enough said.

-- Jeff Taylor


Quick Rating

Samba: Integrating UNIX and Windows

Readability Star Star Star
Originality Star Star
Organization Star Star
Accuracy Star Star Star Star
Consistency Star Star Star HalfStar
Depth Star Star Star
Timeliness Star Star Star
Editing Star Star Star HalfStar
Design Star Star Star
Overall Value Star Star Star

Teach Yourself Samba in 24 Hours

Readability Star Star Star Star
Originality Star Star Star
Organization Star Star Star Star
Accuracy Star Star Star Star
Consistency Star Star Star Star
Depth Star Star Star
Timeliness Star Star Star HalfStar
Editing Star Star Star
Design Star Star Star Star
Overall Value Star Star Star Star

Explanation of ERCB rating scale: No stars = unacceptable, 1 Star = marginal, 2 Stars = average, 3 Stars = above average, 4 Stars = exceptional.


Copyright ©1999 Electronic Review of Computer Books
Created 8/22/1999 / Last modified 9/19/1999 / webmaster@ercb.com