summaryrefslogtreecommitdiff
path: root/docs-xml/using_samba/ch00.xml
blob: 79121b2cf24ccc3280973f97be4144508e07fbbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<preface id="ch00">
<title>Preface</title>




<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>


<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>


<para>Easy: take the day off, read this book, and learn Samba!</para>











<sect1 role="" id="ch00-SECT-1">
<title>The Samba Suite</title>


<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>


<para>
<indexterm id="ch00-idx-941381-0"><primary>Samba</primary><secondary>features/uses</secondary></indexterm>Four features of Samba make it extremely attractive:</para>


<itemizedlist>
<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>
<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>
<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>
<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>
</itemizedlist>

<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>


<itemizedlist>
<listitem><para>Serve Unix files to Windows, OS/2, and other OS clients</para></listitem>
<listitem><para>Allow Unix clients to access PC files</para></listitem>
<listitem><para>Serve network printers to Windows clients</para></listitem>
<listitem><para>Provide name services (broadcast and WINS)</para></listitem>
<listitem><para>Allow browsing of network resources from Windows clients</para></listitem>
<listitem><para>Create Windows workgroups or domains</para></listitem>
<listitem><para>Enforce username and password authentication of clients</para></listitem>
</itemizedlist>
</sect1>









<sect1 role="" id="ch00-SECT-2">
<title>Audience for this Book</title>


<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>


<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>
</sect1>









<sect1 role="" id="ch00-SECT-3">
<title>Samba Installation Checklist</title>


<para>Before you get started, you should have:</para>


<itemizedlist>
<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>

<!-- CD-ROM REFERENCE COMMENTED OUT FOR SAFARI VERSION OF THIS TITLE.

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>

-->

The latest Samba distribution, which you can download directly off the Internet at <systemitem role="url">http://www.samba.org/</systemitem>.</para></listitem>
<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>
</itemizedlist>
</sect1>









<sect1 role="" id="ch00-SECT-4">
<title>Organization</title>


<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>


<variablelist>
<varlistentry><term><link linkend="ch01-48078">Chapter 1</link></term>
<listitem><para>This chapter introduces each of the Samba components and gives a brief overview of NetBIOS and Windows networking.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-2">Chapter 2</link></term>
<listitem><para>This chapter covers configuring, compiling, installing, and testing the Samba server on a Unix platform.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-3">Chapter 3</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="ch04-21486">Chapter 4</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-5">Chapter 5</link></term>
<listitem><para>This chapter continues the discussion of disk options and examines browsing with Samba.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-6">Chapter 6</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-7">Chapter 7</link></term>
<listitem><para>This chapter discusses printer and Windows Internet Naming Service (WINS) setup with Samba.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-8">Chapter 8</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-CH-9">Chapter 9</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-AP-A">Appendix A</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-AP-B">Appendix B</link></term>
<listitem><para>This appendix discusses various techniques to optimize Samba processing on your network.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-AP-C">Appendix C</link></term>
<listitem><para>This appendix covers each of the options used in the <filename>smb.conf</filename> file.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-AP-D">Appendix D</link></term>
<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>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-AP-E">Appendix E</link></term>
<listitem><para>This appendix explains how to download the latest version of Samba with CVS.</para></listitem>
</varlistentry>


<varlistentry><term><link linkend="SAMBA-AP-F">Appendix F</link></term>
<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>
</varlistentry>
</variablelist>
</sect1>









<sect1 role="" id="ch00-SECT-5">
<title>Conventions</title>


<para>The following font conventions are followed throughout this book:</para>


<variablelist>
<varlistentry><term>Italic </term>
<listitem><para>Filenames, file extensions, URLs, Internet addresses, executable files, commands, and emphasis.</para></listitem>
</varlistentry>


<varlistentry><term><literal>Constant Width</literal> </term>
<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>
</varlistentry>


<varlistentry><term><userinput>Bold Constant Width</userinput> </term>
<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>
</varlistentry>


<varlistentry><term><replaceable>Constant Width Italic</replaceable></term>
<listitem><para>Replaceable content in code and command-line information.</para></listitem>
</varlistentry>
</variablelist>


<tip id="ch00-NOTE-0" role="ora">
<para>This icon designates a note, which is an important aside to the nearby text.</para>

</tip>

<warning id="ch00-NOTE-1" role="ora">
<para>This icon designates a warning related to the nearby text.</para>

</warning>
</sect1>









<sect1 role="" id="ch00-SECT-6">
<title>Request for Comments</title>


<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>


<simplelist>

<member>O'Reilly &amp; Associates</member>

<member>101 Morris Street</member>

<member>Sebastopol, CA 95472</member>

<member>1-800-998-9938 (in the U.S. or Canada)</member>

<member>1-707-829-0515 (international/local)</member>

<member>1-707-829-0104 (fax)</member>

<member><email>bookquestions@ora.com</email></member>

</simplelist>


<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>
</sect1>









<sect1 role="" id="ch00-SECT-7">
<title>Acknowledgments</title>


<para>Robert Eckstein</para>


<blockquote>
<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>
</blockquote>


<para>David Collier-Brown</para>


<blockquote>
<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>
</blockquote>


<para>Peter Kelly</para>


<blockquote>
<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>
</blockquote>


<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>


<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>
</sect1>








</preface>