You are reading a book about Samba, a software suite that connects Windows, Unix, and other operating systems using Windows' native networking protocols. Samba allows Unix servers to offer Windows networking services by matching the filesystem and networking models of Unix to those of Windows. Samba acts as a bridge between the two systems, connecting the corresponding parts of their architectures and providing a translation wherever necessary.
Bridging the gap between systems as dissimilar as Windows and Unix is a complex taskone that Samba handles surprisingly well. To be a good Samba administrator, your abilities must parallel Samba's. For starters, you need to know basic Unix system and network administration and have a good understanding of Windows filesystems and networking fundamentals. In addition, you need to learn how Samba fills in the "gray area" between Unix and Windows; for instance, how a Unix user relates to a corresponding Windows account. Once you know how everything fits together, you'll find it easy to configure a Samba server to provide your network with reliable and high-performance resources.
Our job is to make all of that easier for you. We do this by starting out with a quick but comprehensive tour of Windows networking in Chapter 1, followed by task-oriented Chapters 2 and 3, which tell you how to set up a minimal Samba server and configure Windows clients to work with it. Most likely, you will be surprised how quickly you can complete the required tasks.
We believe that a hands-on approach is the most effective, and you can use the clients and servers you build in Chapters 2 and 3 to test examples that we describe throughout the book. You can jump around from chapter to chapter if you like, but if you continue sequentially from Chapter 4 onward, by the time you finish the book you will have a well-configured production Samba server ready for use. All you have to do is add the appropriate support for your intended purpose as we explain how to use each feature.
Audience for This Book
This book is primarily intended for Unix administrators who need to support Windows clients on their network, as well as anyone who needs to access the resources of a Windows network environment from a Unix client. Although we assume that you are familiar with basic Unix system administration, we do not assume that you are a networking expert. We do our best along the way to help out with unusual definitions and terms.
Furthermore, we don't assume that you are an expert in Microsoft Windows. We carefully explain all the essential concepts related to Windows networking, and we go through the Windows side of the installation task in considerable detail, focusing on the current Microsoft operating system offerings. For the Unix side, we give examples that work with common Unix operating systems, such as Linux, Solaris, FreeBSD, and Mac OS X.
We concentrate on Samba 3.0. However, because Samba releases include a high degree of backward compatibility with older releases, we believe you will find this book largely applicable to other versions as well.
How This Book Is Organized
Here is a quick description of each chapter:
Conventions Used in This Book
The following font conventions are followed throughout this book:
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product's documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: "Using Samba, Third Edition, by Gerald Carter, Jay Ts, and Robert Eckstein. Copyright 2007 O'Reilly Media, Inc., 978-0-596-00769-0."
If you feel your use of code examples falls outside fair use of the permission given above, feel free to contact us at firstname.lastname@example.org.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
To ask technical questions or comment on the book, send email to:
We have a web page for this book. You can access this information at:
You can also contact Gerald Carter, the lead author of this edition, at:
When you see a Safari® Enabled icon on the cover of your favorite technology book, that means the book is available online through the O'Reilly Network Safari Bookshelf.
Safari offers a solution that's better than e-books. It's a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at http://safari.oreilly.com.
We would like to thank our technical reviewers on the third edition, David Collier-Brown, Deryck Hodge, Jim McDonough, Judith Myerson, and Bruno Gomes Pessanha. Their comments, corrections, and advice were invaluable in putting this book together. David Brickner acted as the original editor and helped guide the initial chapters. But the real captain of this ship was Andy Oram, who helped to bring the book to completion (once again).
I once described writing a book as an interruption in life. Andy (citing legendary editor Frank Willison) describes them as a kitten that one day grows up into an adult cat and requires constant day-to-day care (perhaps with less of the cuteness factor than the original kitten). I think both analogies point to the immense amount of time required from all parties involved that it takes to bring a book from the initial drafts to the copy you have in your possession now.
I am always amazed to be granted the grace to finish a writing project such as this. I hope that I have fulfilled this statement: "Whatever you do, do it all for the glory of God" (1 Corinthians 10:31).
To my wife, Kristi, who is always my guide back from the land of over-caffeination and sleep deprivation: I can say only thank you once again for your love, support, and understanding. You make me a better person.
To Andy: you have confirmed to me once again why I love writing for O'Reilly.
To the Samba developers I work with on a daily basis: thanks for letting me be a part of something great and for giving me something to write about.
This book would have been extremely difficult to write if it hadn't been for the copy of VMware Workstation graciously provided by VMware, Inc. I want to thank Rik Farrow for his clarifying comments on security topics related to Samba and Windows, and thank both him and Rose Moon for their supportive friendship. Thanks also go to Mark Watson for his encouragement and advice on the topic of authoring technical books. Additionally, I'd like to express my appreciation to Andy Oram at O'Reilly for being a supportive, friendly, and easygoing editor, and for offering me terms that I could say yes tosomething that a few other publishers didn't even approach. SUSE, Inc., generously provided a copy of SUSE Linux 8.1 Professional.
I'd first like to recognize Dave Collier-Brown and Peter Kelly for all their help in the creation of this book. I'd also like to thank each technical reviewer who helped polish this book into shape on such short notice: Matthew Temple, Jeremy Allison, and of course Andrew Tridgell. Andrew and Jeremy deserve special recognition, not only for creating such a wonderful product, but also for providing a tireless amount of support in the final phase of this bookhats off to you, guys! A warm hug goes out to my wife Michelle, who once again put up with a husband loaded down with too much caffeine and a tight schedule. Thanks to Dave Sifry and the people at LinuxCare, San Francisco, for hosting me on such short notice for Andrew Tridgell's visit. And finally, a huge amount of thanks to our editor, Andy Oram, who (very) patiently helped guide this book through its many stages until we got it right.
We would especially like to give thanks to Perry Donham and Peter Kelly for helping mold the first draft of this book. Although Perry was unable to contribute to subsequent drafts, his material was essential to getting this book off on the right foot. In addition, some of the browsing material came from text originally written by Dan Shearer for O'Reilly.