Setting Up a SAMBA Server

CompUSA recently had 160Mb disks on sale for $79 each, so I bought a few. My intent was to repurpose one of the old Pentium II machines I've got lying around as Samba server for my wife, who takes lots of digital pictures (she has a Nikon D100). The first step was to set up a RedHat 9 machine with a RAID 1 set-up on the drives so that they're mirrored. I've never played much SAMBA, so I was looking for a good reference.

I'm fortunate to know John Terpstra, one of the founders of the SAMBA project and author of The Official SAMBA 3 HOW-TO, so I got a preprint of his latest book Samba-3 by Example : Practical Exercises to Successful Deployment. If you use SAMBA, you need this book.

Unlike the HOW-TO, this book is a cookbook. It sets up scenarios and then walks through the complete setup for that scenario. John is thorough and detailed. Chapter 1 is a primer on how to use network tools like Ethereal to debug your network. That will give you some idea of where John is coming from. Of course, my simple setup was found in the second chapter, but the book goes well beyond that. The individual steps were well explained, so I felt like I was learning the reasons for doing things, not just following a recipe. I'm confident that even someone who has used SAMBA for years will get something from every chapter in this book. This book is supposed to be released soon, so go to Amazon and pre-order a copy. You won't be disappointed.

The result? Within an hour or so, I had a new Linux box with mirrored drives and SAMBA 3.0 running and my wife's iBook happily connecting to it. A few hints:

  • You need to set up IPTABLES to allow connections from the local network to the Linux server, if you want things to work. A few minutes of playing with smbclient will show you the problem.
  • The mount_smbfs command will allow you to mount the drive from a script (e.g. for backup scripts), but the resulting mount won't be visable to Finder.