dynconfig/config.m4: disallow --prefix=/usr and --prefix=/usr/local without --enable-fhs
[Samba/gebeck_regimport.git] / docs-xml / using_samba / ch00.xml
blob79121b2cf24ccc3280973f97be4144508e07fbbf
1 <preface id="ch00">
2 <title>Preface</title>
7 <para>It's nine in the morning and you've just arrived at the computer center after a refreshing night's sleep. Your pager hasn't gone off in months. Life is pretty good as a system administrator &mdash; and why shouldn't it be, with the network you're running? Two hundred identical machines, all running the same operating system. All of the printers are networked, accessible from anywhere in the building, and the auto-configuration scripts that the manufacturer supplied ensure that everyone in the company has a consistent view of the shared disks you've set up. Yes, this is the good life. You lean back and take that first delicious sip of morning coffee . . . .</para>
10 <para>And then, the alarm clock jolts you out of your blissful reverie. If you're like most system administrators, this could only be a dream. Your morning probably starts with a tireless struggle to get four different computer platforms running three different operating systems simply to talk to each other &mdash; that is, if the phone ever stops ringing. Most of your users don't understand why it's so hard to access a file on another computer or to send a job to a remote printer. The logs show that the backups are late. For some reason the PCs on the second floor can't find the tape server. With all these headaches, what's a network administrator to do?</para>
13 <para>Easy: take the day off, read this book, and learn Samba!</para>
25 <sect1 role="" id="ch00-SECT-1">
26 <title>The Samba Suite</title>
29 <para>Samba is a suite of tools for sharing resources such as printers and files across a network. This may be a bit of an oversimplification, but Samba is really designed to make your life easier. Samba uses the Server Message Block (SMB) protocol, which is endorsed jointly by Microsoft and IBM, to communicate low-level data between Windows clients and Unix servers on a TCP/IP network.</para>
32 <para>
33 <indexterm id="ch00-idx-941381-0"><primary>Samba</primary><secondary>features/uses</secondary></indexterm>Four features of Samba make it extremely attractive:</para>
36 <itemizedlist>
37 <listitem><para>Samba speaks the same SMB protocol that Microsoft and IBM operating systems have used as their standard since DOS 3.0. This means that almost all Windows machines already understand it and there is no extra client software to install.</para></listitem>
38 <listitem><para>Samba runs on a variety of platforms, including most variants of Unix, OpenVMS, OS/2, AmigaDOS, and NetWare. This means that you can use a single program on the server to provide files and printers to a community of PCs.</para></listitem>
39 <listitem><para>Samba is free. There are several commercial products that duplicate Samba's features, and some of them are quite expensive. Samba offers you an alternative to packages that could gobble up a significant portion of your IS budget. Samba is distributed under the GNU General Public License (GPL), and is considered by its authors to be <firstterm>Open Source</firstterm> software. In other words, you can freely download both the application and the accompanying source code to your computer, and even improve on the original Samba programs if you like.</para></listitem>
40 <listitem><para>Samba administration is centralized on the server. You don't have to visit every one of your machines, floppy or CD-ROM in hand, to upgrade the client software.</para></listitem>
41 </itemizedlist>
43 <para>Samba is a complete solution for local area networks (LANs) of all sizes&mdash;everything from the two-computer home network to corporate installations with hundreds of nodes. Samba is simple to set up and to administer, and presents itself as a transparent network environment that offers users access to all of the resources they need to get their work done. Once you've set it up, Samba will let you:</para>
46 <itemizedlist>
47 <listitem><para>Serve Unix files to Windows, OS/2, and other OS clients</para></listitem>
48 <listitem><para>Allow Unix clients to access PC files</para></listitem>
49 <listitem><para>Serve network printers to Windows clients</para></listitem>
50 <listitem><para>Provide name services (broadcast and WINS)</para></listitem>
51 <listitem><para>Allow browsing of network resources from Windows clients</para></listitem>
52 <listitem><para>Create Windows workgroups or domains</para></listitem>
53 <listitem><para>Enforce username and password authentication of clients</para></listitem>
54 </itemizedlist>
55 </sect1>
65 <sect1 role="" id="ch00-SECT-2">
66 <title>Audience for this Book</title>
69 <para>The primary audience of this book is Unix administrators who need to support PCs on their network, and anyone who needs to provide a Unix server in a PC environment. But we don't want to burden you with an endless series of arcane system administration tools and vocabulary. While we assume you are familiar with basic Unix system administration, we will <emphasis>not</emphasis> assume you are a networking expert. We'll do our best along the way to help out with unusual definitions and terms.</para>
72 <para>Because we don't assume a tremendous amount of experience with Microsoft Windows, we will go through the PC side of the installation task in considerable detail and give examples for both Windows 95/98 and Windows NT, which are subtly different. For the Unix side, we will give examples for common Unix operating systems, such as Linux 2.0 or Solaris 2.6.</para>
73 </sect1>
83 <sect1 role="" id="ch00-SECT-3">
84 <title>Samba Installation Checklist</title>
87 <para>Before you get started, you should have:</para>
90 <itemizedlist>
91 <listitem><para><indexterm id="ch00-idx-941383-0"><primary>Samba</primary><secondary>version 2.0.5</secondary></indexterm><indexterm id="ch00-idx-941383-1"><primary>Samba</primary><secondary>distribution</secondary></indexterm><indexterm id="ch00-idx-941383-2"><primary>URLs (uniform resource locators)</primary><secondary>Samba</secondary><tertiary>distribution</tertiary></indexterm>
93 <!-- CD-ROM REFERENCE COMMENTED OUT FOR SAFARI VERSION OF THIS TITLE.
95 Either the CD-ROM from this book (which contains both source and binary distributions of Samba 2.0.5) or the latest Samba distribution, which you can download directly off the Internet at <systemitem role="url">http://www.samba.org/</systemitem>. </para>
97 -->
99 The latest Samba distribution, which you can download directly off the Internet at <systemitem role="url">http://www.samba.org/</systemitem>.</para></listitem>
100 <listitem><para>The names and IP addresses of the servers and client machines you plan to use, the netmask of your network, and the names and IP addresses of your domain name (DNS) servers.</para></listitem>
101 </itemizedlist>
102 </sect1>
112 <sect1 role="" id="ch00-SECT-4">
113 <title>Organization</title>
116 <para>The book can be roughly divided into two sections: Samba installation (<link linkend="ch01-48078">Chapter 1</link> through <link linkend="SAMBA-CH-3">Chapter 3</link>) and Samba configuration and optimization (<link linkend="ch04-21486">Chapter 4</link> through <link linkend="SAMBA-CH-9">Chapter 9</link>). Here is a detailed breakdown of each of the chapters:</para>
119 <variablelist>
120 <varlistentry><term><link linkend="ch01-48078">Chapter 1</link></term>
121 <listitem><para>This chapter introduces each of the Samba components and gives a brief overview of NetBIOS and Windows networking.</para></listitem>
122 </varlistentry>
125 <varlistentry><term><link linkend="SAMBA-CH-2">Chapter 2</link></term>
126 <listitem><para>This chapter covers configuring, compiling, installing, and testing the Samba server on a Unix platform.</para></listitem>
127 </varlistentry>
130 <varlistentry><term><link linkend="SAMBA-CH-3">Chapter 3</link></term>
131 <listitem><para>This chapter explains how to configure Microsoft Windows 95/98 and NT 4.0 clients to participate in an SMB network. It also gives a brief introduction to the SMB protocol in action.</para></listitem>
132 </varlistentry>
135 <varlistentry><term><link linkend="ch04-21486">Chapter 4</link></term>
136 <listitem><para>This chapter gets you up to speed with the individual parts of the Samba configuration file and shows you how to configure disk services.</para></listitem>
137 </varlistentry>
140 <varlistentry><term><link linkend="SAMBA-CH-5">Chapter 5</link></term>
141 <listitem><para>This chapter continues the discussion of disk options and examines browsing with Samba.</para></listitem>
142 </varlistentry>
145 <varlistentry><term><link linkend="SAMBA-CH-6">Chapter 6</link></term>
146 <listitem><para>This chapter discusses how to set up users, introduces you to Samba security, and shows you how to work with encrypted and non-encrypted passwords. We also discuss how to set up Samba as a primary domain controller for Windows 95/98 and NT clients.</para></listitem>
147 </varlistentry>
150 <varlistentry><term><link linkend="SAMBA-CH-7">Chapter 7</link></term>
151 <listitem><para>This chapter discusses printer and Windows Internet Naming Service (WINS) setup with Samba.</para></listitem>
152 </varlistentry>
155 <varlistentry><term><link linkend="SAMBA-CH-8">Chapter 8</link></term>
156 <listitem><para>This chapter bundles several miscellaneous activities associated with Samba, such as configuring Samba shares for programmers, internationalization issues, and backing up with <emphasis>smbtar</emphasis>.</para></listitem>
157 </varlistentry>
160 <varlistentry><term><link linkend="SAMBA-CH-9">Chapter 9</link></term>
161 <listitem><para>If you have problems installing Samba, this comparatively large chapter is packed with troubleshooting hints and strategies as to what might be going wrong.</para></listitem>
162 </varlistentry>
165 <varlistentry><term><link linkend="SAMBA-AP-A">Appendix A</link></term>
166 <listitem><para>This appendix shows you the nitty-gritty of setting up Samba with Secure Sockets Layers (SSL) connections between the server and its clients.</para></listitem>
167 </varlistentry>
170 <varlistentry><term><link linkend="SAMBA-AP-B">Appendix B</link></term>
171 <listitem><para>This appendix discusses various techniques to optimize Samba processing on your network.</para></listitem>
172 </varlistentry>
175 <varlistentry><term><link linkend="SAMBA-AP-C">Appendix C</link></term>
176 <listitem><para>This appendix covers each of the options used in the <filename>smb.conf</filename> file.</para></listitem>
177 </varlistentry>
180 <varlistentry><term><link linkend="SAMBA-AP-D">Appendix D</link></term>
181 <listitem><para>Each of the server daemons and tools that make up the Samba suite are covered in this appendix. In addition, we provide a list of mirror sites on the Internet from which Samba can be downloaded.</para></listitem>
182 </varlistentry>
185 <varlistentry><term><link linkend="SAMBA-AP-E">Appendix E</link></term>
186 <listitem><para>This appendix explains how to download the latest version of Samba with CVS.</para></listitem>
187 </varlistentry>
190 <varlistentry><term><link linkend="SAMBA-AP-F">Appendix F</link></term>
191 <listitem><para>This appendix provides a large-scale Samba configuration file, which you might find in place at a large corporation. We have embedded comments in the file to explain the more arcane options.</para></listitem>
192 </varlistentry>
193 </variablelist>
194 </sect1>
204 <sect1 role="" id="ch00-SECT-5">
205 <title>Conventions</title>
208 <para>The following font conventions are followed throughout this book:</para>
211 <variablelist>
212 <varlistentry><term>Italic </term>
213 <listitem><para>Filenames, file extensions, URLs, Internet addresses, executable files, commands, and emphasis.</para></listitem>
214 </varlistentry>
217 <varlistentry><term><literal>Constant Width</literal> </term>
218 <listitem><para>Samba configuration options and other code that appear in the text, and command-line information that should be typed verbatim on the screen.</para></listitem>
219 </varlistentry>
222 <varlistentry><term><userinput>Bold Constant Width</userinput> </term>
223 <listitem><para>Commands that are entered by the user, and new configuration options that we wish to bring to the attention of the reader.</para></listitem>
224 </varlistentry>
227 <varlistentry><term><replaceable>Constant Width Italic</replaceable></term>
228 <listitem><para>Replaceable content in code and command-line information.</para></listitem>
229 </varlistentry>
230 </variablelist>
233 <tip id="ch00-NOTE-0" role="ora">
234 <para>This icon designates a note, which is an important aside to the nearby text.</para>
236 </tip>
238 <warning id="ch00-NOTE-1" role="ora">
239 <para>This icon designates a warning related to the nearby text.</para>
241 </warning>
242 </sect1>
252 <sect1 role="" id="ch00-SECT-6">
253 <title>Request for Comments</title>
256 <para>As a reader of this book, you can help us to improve the next edition. If you find errors, inaccuracies, or typographical errors anywhere in the book, please let us at O'Reilly know about them. Also, if you find any misleading statements or confusing explanations, let us know that as well. Send all correspondence to:</para>
259 <simplelist>
261 <member>O'Reilly &amp; Associates</member>
263 <member>101 Morris Street</member>
265 <member>Sebastopol, CA 95472</member>
267 <member>1-800-998-9938 (in the U.S. or Canada)</member>
269 <member>1-707-829-0515 (international/local)</member>
271 <member>1-707-829-0104 (fax)</member>
273 <member><email>bookquestions@ora.com</email></member>
275 </simplelist>
278 <para>Please let us know what we can do to make the book more helpful to you. We take your comments seriously, and will do whatever we can to make this book as useful as it can be.</para>
279 </sect1>
289 <sect1 role="" id="ch00-SECT-7">
290 <title>Acknowledgments</title>
293 <para>Robert Eckstein</para>
296 <blockquote>
297 <para>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 of the technical reviewers that 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 for providing a tireless amount of support in the final phase of this book&mdash;hats 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 on 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.</para>
298 </blockquote>
301 <para>David Collier-Brown</para>
304 <blockquote>
305 <para>I'd especially like to thank Joyce, who put up with me during the sometimes exciting development of the book. My thanks to Andy Oram, who was kind enough to provide the criticism that allowed me to contribute; the crew at Opcom who humored the obvious madman in their midst; and Ian MacMillan, who voluntarily translated several of my early drafts from nerd to English. I would also like to give special thanks to Perry Donham, Drew Sullivan, and Jerry DeRoo.</para>
306 </blockquote>
309 <para>Peter Kelly</para>
312 <blockquote>
313 <para>A few people really made this book possible, and I have to bow to them. Dave Collier-Brown, and then Bob Eckstein, took over my part of this project with style and professionalism and I can't explain how much I owe them for the great work that came out of it. Editor Andy Oram is by far the most patient and pleasant person I have met. Also, I don't think that I would have been involved in this book without the help of Xavier Cazin from O'Reilly, who originally came to me asking for a proposal after reading my Linux Journal article. I also would like to thank all of the JDP.COM consultants (  Jerry, Peggyann, Drew, Gord, Jerome, Mark, Rick&mdash;too many to list!) for allowing me to continue to work with them. I thank the O'Reilly staff that I have worked with as well; they are a great bunch of people. Also, thanks to the Samba Team for making Samba in the first place. And most importantly, Kate McKay, for staying with me this long!</para>
314 </blockquote>
317 <para>We would especially like to give thanks to Perry Donham 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.</para>
320 <para>We are deeply indebted to the production department at O'Reilly for another fantastic job. Sarah Jane Shangraw worked long hours accommodating our seemingly endless edits, and Rob Romano tirelessly edited our images again and again until they were perfect. Special thanks also to Claire Cloutier LeBlanc, Rhon Porter, and Mike Sierra for their help&mdash;we couldn't have done it without any of them. It is largely through their collective efforts that this book arrived to you in November 1999 instead of November 2000.</para>
321 </sect1>
330 </preface>