source: server/major/samba3.xml@ e2c98cc6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since e2c98cc6 was 0aeb696, checked in by Randy McMurchy <randy@…>, 18 years ago

Added a comment to each file that may need a mention of a test suite added to it, this allows closing of bug #1697

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5951 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 41.3 KB
RevLine 
[0931098]1<?xml version="1.0" encoding="ISO-8859-1"?>
[ff769b8c]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
[0931098]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[0aeb696]7 <!-- Inserted as a reminder to do this. The mention of a test suite
8 is usually right before the root user installation commands. Please
9 delete these 12 (including one blank) lines after you are done.-->
10
11 <!-- Use one of the two mentions below about a test suite,
12 delete the line that is not applicable. Of course, if the
13 test suite uses syntax other than "make check", revise the
14 line to reflect the actual syntax to run the test suite -->
15
16 <!-- <para>This package does not come with a test suite.</para> -->
17 <!-- <para>To test the results, issue: <command>make check</command>.</para> -->
18
[a8ecf657]19 <!ENTITY samba3-download-http "http://us1.samba.org/samba/ftp/stable/samba-&samba3-version;.tar.gz">
[22320b4c]20 <!ENTITY samba3-download-ftp "ftp://ftp.samba.org/pub/samba/samba-&samba3-version;.tar.gz">
[a8ecf657]21 <!ENTITY samba3-md5sum "5c39505af17cf5caf3d6ed8bab135036">
22 <!ENTITY samba3-size "17.5 MB">
23 <!ENTITY samba3-buildsize "199 MB">
24 <!ENTITY samba3-time "2.8 SBU">
[0931098]25]>
26
[736ede9]27<sect1 id="samba3" xreflabel="Samba-&samba3-version;">
[99ef1fc]28 <?dbhtml filename="samba3.html"?>
29
30 <sect1info>
31 <othername>$LastChangedBy$</othername>
32 <date>$Date$</date>
[a6ac43b]33 <keywordset>
34 <keyword role="package">samba-&samba3-version;.tar</keyword>
[2a5310e8]35 <keyword role="ftpdir">samba</keyword>
[a6ac43b]36 </keywordset>
[99ef1fc]37 </sect1info>
38
39 <title>Samba-&samba3-version;</title>
40
41 <indexterm zone="samba3">
42 <primary sortas="a-Samba">Samba</primary>
43 </indexterm>
44
[4e82a189]45 <sect2 role="package">
[99ef1fc]46 <title>Introduction to Samba</title>
47
48 <para>The <application>Samba</application> package provides file and print
49 services to SMB/CIFS clients and Windows networking to Linux clients.
50 <application>Samba</application> can also be configured as a Windows NT
51 4.0 Domain Controller replacement (with caveats working with NT PDC's and
52 BDC's), a file/print server acting as a member of a Windows NT 4.0 or
53 Active Directory domain and a NetBIOS (rfc1001/1002) nameserver (which
54 amongst other things provides LAN browsing support).</para>
55
56 <bridgehead renderas="sect3">Package Information</bridgehead>
57 <itemizedlist spacing="compact">
58 <listitem>
59 <para>Download (HTTP): <ulink url="&samba3-download-http;"/></para>
60 </listitem>
61 <listitem>
62 <para>Download (FTP): <ulink url="&samba3-download-ftp;"/></para>
63 </listitem>
64 <listitem>
65 <para>Download MD5 sum: &samba3-md5sum;</para>
66 </listitem>
67 <listitem>
68 <para>Download size: &samba3-size;</para>
69 </listitem>
70 <listitem>
71 <para>Estimated disk space required: &samba3-buildsize;</para>
72 </listitem>
73 <listitem>
74 <para>Estimated build time: &samba3-time;</para>
75 </listitem>
76 </itemizedlist>
77
[a8ecf657]78 <!--
[22320b4c]79 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
80 <itemizedlist spacing="compact">
[bccbdaea]81 <listitem>
[22320b4c]82 <para>Required patch if you have <application>Heimdal</application>
83 installed: <ulink
84 url="&patch-root;/samba-&samba3-version;-heimdal-1.patch"/></para>
85 </listitem>
86 </itemizedlist>
[a8ecf657]87 -->
[22320b4c]88
[99ef1fc]89 <bridgehead renderas="sect3">Samba Dependencies</bridgehead>
90
91 <bridgehead renderas="sect4">Optional</bridgehead>
[a6ac43b]92 <para role="optional"><xref linkend="popt"/>,
[6603f8b]93 <xref linkend="linux-pam"/>,
[99ef1fc]94 <xref linkend="openldap"/>,
95 <xref linkend="cups"/>,
[a8ecf657]96 <xref linkend="heimdal"/> or <xref linkend="mitkrb"/>, and
97 <xref linkend="python"/> (to build Samba API bindings for the
98 <application>Python</application> installation)</para>
99 <!-- only used for the test suite which is not really functional
100 and
101 <ulink url="http://valgrind.kde.org/">Valgrind</ulink></para> -->
102
103 <bridgehead renderas="sect4">Optional
104 (To Build Experimental passdb Libraries</bridgehead>
105 <para><xref linkend="libxml2"/>,
[214b9ac]106 <xref linkend="mysql"/>,
[a8ecf657]107 <xref linkend="postgresql"/></para>
[99ef1fc]108
[3cb0c57]109 <para condition="html" role="usernotes">User Notes:
110 <ulink url="&blfs-wiki;/samba3"/></para>
111
[99ef1fc]112 </sect2>
113
114 <sect2 role="installation">
115 <title>Installation of Samba</title>
116
[a8ecf657]117 <!--
[22320b4c]118 <para>A <application>Samba</application> <filename>include.h</filename>
119 header now does checks for C++ reserved names. The package will not build
120 if you have <application>Heimdal</application> installed as Heimdal uses
121 some of these reserved names inappropriately. If you have
122 <application>Heimdal</application> installed, apply the following patch to
123 disable these checks and allow the package to compile successfully:</para>
124
125<screen><userinput>patch -Np1 -i ../samba-&samba3-version;-heimdal-1.patch</userinput></screen>
[a8ecf657]126 -->
[22320b4c]127
[99ef1fc]128 <para>Install <application>Samba</application> by running the following
129 commands:</para>
130
[22320b4c]131 <note>
132 <para>You may want to run <command>configure</command> with the
133 <option>--help</option> parameter. There may be other parameters
134 needed to take advantage of the optional dependencies.</para>
135 </note>
136
[99ef1fc]137<screen><userinput>cd source &amp;&amp;
[0931098]138./configure \
139 --prefix=/usr \
140 --sysconfdir=/etc \
141 --localstatedir=/var \
142 --with-piddir=/var/run \
143 --with-fhs \
144 --with-smbmount &amp;&amp;
[99ef1fc]145make</userinput></screen>
[38b41c2]146
[a8ecf657]147 <para>This package does not come with a functional test suite.</para>
[22320b4c]148
[99ef1fc]149 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[38b41c2]150
[214b9ac]151<!-- Commenting out the need for /var/cache/samba as my testing has
152 shown me that this directory is not used. Grepping the source
[6473e74]153 tree also turns up nothing about 'cache/samba'. -Randy
[99ef1fc]154<screen role="root"><userinput>install -v -m755 -d /var/cache/samba &amp;&amp;
[214b9ac]155-->
156
157<screen role="root"><userinput>make install &amp;&amp;
[b5d1d872]158mv -v /usr/lib/samba/libsmbclient.so /usr/lib &amp;&amp;
159ln -v -sf ../libsmbclient.so /usr/lib/samba &amp;&amp;
[214b9ac]160ln -v -sf libsmbclient.so /usr/lib/libsmbclient.so.0 &amp;&amp;
161
[a8ecf657]162chmod -v 644 /usr/include/lib{smbclient,msrpc}.h &amp;&amp;
[214b9ac]163
[b5d1d872]164install -v -m755 nsswitch/libnss_win{s,bind}.so /lib &amp;&amp;
165ln -v -sf libnss_winbind.so /lib/libnss_winbind.so.2 &amp;&amp;
166ln -v -sf libnss_wins.so /lib/libnss_wins.so.2 &amp;&amp;
[214b9ac]167
[99ef1fc]168if [ -f nsswitch/pam_winbind.so ]; then
[b5d1d872]169 install -v -m755 nsswitch/pam_winbind.so /lib/security
170fi &amp;&amp;
[214b9ac]171
[b5d1d872]172install -v -m644 ../examples/smb.conf.default /etc/samba &amp;&amp;
[214b9ac]173
174install -v -m755 -d /usr/share/doc/samba-&samba3-version; &amp;&amp;
175install -v -m644 ../docs/*.pdf /usr/share/doc/samba-&samba3-version; &amp;&amp;
[a8ecf657]176ln -v -s ../../samba/swat /usr/share/doc/samba-&samba3-version;</userinput></screen>
[214b9ac]177
178 <para>If you passed the <option>--with-python</option> option to the
179 <command>configure</command> script, issue the following command as the
180 <systemitem class="username">root</systemitem> user to install the
181 <application>Python</application> extensions:</para>
182
183<screen role="root"><userinput>make python_install</userinput></screen>
[99ef1fc]184
185 </sect2>
186
187 <sect2 role="commands">
188 <title>Command Explanations</title>
189
190 <para><parameter>--sysconfdir=/etc</parameter>: Sets the configuration
191 file directory to avoid the default of
192 <filename class="directory">/usr/etc</filename>.</para>
193
194 <para><parameter>--localstatedir=/var</parameter>: Sets the variable
195 data directory to avoid the default of
196 <filename class="directory">/usr/var</filename>.</para>
197
198 <para><parameter>--with-fhs</parameter>: Assigns all other file paths in
199 a manner compliant with the Filesystem Hierarchy Standard (FHS).</para>
200
201 <para><parameter>--with-smbmount</parameter>: Orders the creation of an
202 extra binary for use by the <command>mount</command> command so that
203 mounting remote SMB (Windows) shares becomes no more complex than
204 mounting remote NFS shares.</para>
205
206 <para><option>--with-pam</option>: Use this parameter to link
207 <application>Linux-PAM</application> into the build. This
208 also builds the <filename class='libraryfile'>pam_winbind.so</filename>
209 <application>PAM</application> module. You can find
210 instructions on how to configure and use the module by running
211 <command>man winbindd</command>.</para>
212
[214b9ac]213 <!-- I am convinced that this command is no longer necessary. -Randy
[99ef1fc]214 <para><command>install -v -d /var/cache/samba</command>: This directory is
215 needed for proper operation of the <command>smbd</command> and
216 <command>nmbd</command> daemons.</para>
[214b9ac]217 -->
[99ef1fc]218
219 <para><command>mv -v /usr/lib/samba/libsmbclient.so ...; ln -v -sf
220 ../libsmbclient.so ...</command>: The
221 <filename class='libraryfile'>libsmbclient.so</filename> library is needed
222 by other packages. This command moves it to a location where other packages
223 can find it.</para>
224
225 <para><command>install -v -m755 nsswitch/libnss_win{s,bind}.so /lib</command>:
226 The nss libraries are not installed by default. If you intend to use
227 winbindd for domain auth, and/or WINS name resolution,
228 you need these libraries.</para>
229
230 <para><command>ln -v -sf libnss_winbind.so /lib/libnss_winbind.so.2</command>
231 and <command>ln -v -sf libnss_wins.so /lib/libnss_wins.so.2</command>:
232 These symlinks are required by glibc to use the NSS
233 libraries.</para>
234
235 <para><command>install -v -m644 ../examples/smb.conf.default
236 /etc/samba</command>: This copies a default <filename>smb.conf</filename>
[2ccb0dc]237 file into <filename>/etc/samba</filename>. This sample configuration will
238 not work until you copy it to <filename>/etc/samba/smb.conf</filename> and
239 make the appropriate changes for your installation. See the configuration
240 section for minimum values which must be set.</para>
[99ef1fc]241
242 </sect2>
243
244 <sect2 role="configuration">
245 <title>Configuring Samba</title>
246
247 <sect3 id="samba3-config">
248 <title>Config Files</title>
249
250 <para>/etc/samba/smb.conf</para>
251
252 <indexterm zone="samba3 samba3-config">
253 <primary sortas="e-etc-samba-smb.conf">/etc/samba/smb.conf</primary>
254 </indexterm>
255
256 </sect3>
257
[e75747d1]258 <sect3>
259 <title>Mounting Shares by Unprivileged Users</title>
260
261 <para>If it is desired for unprivileged users to directly mount (and
262 unmount) SMB shares, the <command>smbmnt</command> and
263 <command>smbumount</command> commands must be setuid
264 <systemitem class='username'>root</systemitem>. Note that users can
[c9f3c0a]265 only mount SMB shares on a mount point owned by that user (requires
266 write access also). If desired, change these programs to setuid
[e75747d1]267 <systemitem class='username'>root</systemitem> by issuing the following
[bccbdaea]268 command as the <systemitem class='username'>root</systemitem>
[e75747d1]269 user:</para>
270
271<screen role="root"><userinput>chmod -v 4755 /usr/bin/smb{mnt,umount}</userinput></screen>
272
273 </sect3>
274
[2ccb0dc]275 <sect3>
[fc290c7]276 <title>Printing to SMB Clients</title>
[2ccb0dc]277
[fc290c7]278 <para>If you use <application>CUPS</application> for print services,
279 and you wish to print to a printer attached to an SMB client, you
280 need to create an SMB backend device. To create the device, issue the
281 following command as the <systemitem class="username">root</systemitem>
282 user:</para>
[2ccb0dc]283
[fc290c7]284<screen role="root"><userinput>ln -v -sf /usr/bin/smbspool /usr/lib/cups/backend/smb</userinput></screen>
[2ccb0dc]285
286 </sect3>
287
[99ef1fc]288 <sect3>
[fc290c7]289 <title>Configuration Information</title>
[99ef1fc]290
291 <para>Due to the complexity and the many various uses for
[fc290c7]292 <application>Samba</application>, complete configuration for all the
[e59bdce]293 package's capabilities is well beyond the scope of the BLFS book. This
[fc290c7]294 section provides instructions to configure the
295 <filename>/etc/samba/smb.conf</filename> file for two common scenarios.
296 The complete contents of <filename>/etc/samba/smb.conf</filename> will
[bccbdaea]297 depend on the purpose of <application>Samba</application>
[fc290c7]298 installation.</para>
299
300 <note>
301 <para>You may find it easier to copy the configuration parameters shown
302 below into an empty <filename>/etc/samba/smb.conf</filename> file
303 instead of copying and editing the default file as mentioned in the
304 <quote>Command Explanations</quote> section. How you create/edit the
305 <filename>/etc/samba/smb.conf</filename> file will be left up to
306 you. Do ensure the file is only writeable by the
307 <systemitem class="username">root</systemitem> user (mode 644).</para>
308 </note>
309
310 <sect4>
311 <title>Scenario 1: Minimal Standalone Client-Only Installation</title>
312
[bccbdaea]313 <para>Choose this variant if you only want to transfer files using
[fc290c7]314 <command>smbclient</command>, mount Windows shares and print to Windows
[bccbdaea]315 printers, and don't want to share your files and printers to Windows
[fc290c7]316 machines.</para>
317
318 <para>A <filename>/etc/samba/smb.conf</filename> file with the following
319 three parameters is sufficient:</para>
320
321<screen role='root'><literal>[global]
322 workgroup = <replaceable>MYGROUP</replaceable>
323 dos charset = <replaceable>cp850</replaceable>
324 unix charset = <replaceable>ISO-8859-1</replaceable></literal></screen>
325
326 <para>The values in this example specify that the computer belongs to a
327 Windows workgroup named
328 <quote><replaceable>MYGROUP</replaceable></quote>, uses the
329 <quote><replaceable>cp850</replaceable></quote> character set on the
330 wire when talking to MS-DOS and MS Windows 9x, and that the filenames
331 are stored in the <quote><replaceable>ISO-8859-1</replaceable></quote>
332 encoding on the disk. Adjust these values appropriately for your
333 installation. The <quote>unix charset</quote> value must be the same as
334 the output of <command>locale charmap</command> when executed with the
335 <envar>LANG</envar> variable set to your preferred locale, otherwise the
336 <command>ls</command> command may not display correct filenames of
337 downloaded files.</para>
338
339 <para>There is no need to run any <application>Samba</application>
340 servers in this scenario, thus you don't need to install the provided
341 bootscripts.</para>
342
343 </sect4>
344
345 <sect4>
346 <title>Scenario 2: Standalone File/Print Server</title>
347
348 <para>Choose this variant if you want to share your files and printers
349 to Windows machines in your workgroup in addition to the capabilities
350 described in Scenario 1.</para>
351
352 <para>In this case, the <filename>/etc/samba/smb.conf.default</filename>
[bccbdaea]353 file may be a good template to start from. Also add
[fc290c7]354 <quote>dos charset</quote> and <quote>unix charset</quote> parameters
355 to the <quote>[global]</quote> section as described in Scenario 1 in
356 order to prevent filename corruption.</para>
357
358 <para>The following configuration file creates a separate share for each
359 user's home directory and also makes all printers available to Windows
360 machines:</para>
361
362<screen role='root'><literal>[global]
363 workgroup = <replaceable>MYGROUP</replaceable>
364 dos charset = <replaceable>cp850</replaceable>
365 unix charset = <replaceable>ISO-8859-1</replaceable>
366
367[homes]
368 comment = Home Directories
369 browseable = no
370 writable = yes
371
372[printers]
373 comment = All Printers
374 path = /var/spool/samba
375 browseable = no
376 guest ok = no
377 printable = yes</literal></screen>
378
[bccbdaea]379 <para>Other parameters you may wish to customize in the
[fc290c7]380 <quote>[global]</quote> section include:</para>
381
382<screen role='root'><literal> server string =
383 security =
384 hosts allow =
385 load printers =
386 log file =
387 max log size =
388 socket options =
389 local master =</literal></screen>
390
391 <para>Reference the comments in the
392 <filename>/etc/samba/smb.conf.default</filename> file for information
393 regarding these parameters.</para>
394
395 <para>Since the <command>smbd</command> and <command>nmbd</command>
396 daemons are needed in this case, install the <filename>samba</filename>
397 bootscript. Be sure to run <command>smbpasswd</command> (with the
398 <option>-a</option> option to add users) to enable and
399 set passwords for all accounts that need
400 <application>Samba</application> access, or use the SWAT web interface
401 (see below) to do the same. Using the default
402 <application>Samba</application> passdb backend, any user you attempt
403 to add will also be required to exist in the
404 <filename>/etc/passwd</filename> file.</para>
405
406 </sect4>
407
408 <sect4>
409 <title>Advanced Requirements</title>
410
411 <para>More complex scenarios involving domain control or membership are
412 possible if the right flags are passed to the ./configure script when
413 the package is built. Such setups are advanced topics and cannot be
414 adequately covered in BLFS. Many complete books have been written on
415 these topics alone. It should be noted, however, that a
416 <application>Samba</application> BDC cannot be used as a fallback
417 for a Windows PDC, and conversely, a Windows BDC cannot be used as a
418 fallback for a <application>Samba</application> PDC. Also in some
[bfb7882]419 domain membership scenarios, the <command>winbindd</command> daemon and
[fc290c7]420 the corresponding bootscript are needed.</para>
421
422 <para>There is quite a bit of documentation available which covers many
423 of these advanced configurations. Point your web browser to the links
424 below to view some of the documentation included with the
425 <application>Samba</application> package:</para>
426
427 <itemizedlist spacing='compact'>
428 <listitem>
429 <para>Using Samba, 2nd Edition; a popular book published by O'Reilly
430 <ulink url="file:///usr/share/samba/swat/using_samba/toc.html"/></para>
431 </listitem>
432 <listitem>
433 <para>The Official Samba HOWTO and Reference Guide <ulink
434 url="file:///usr/share/samba/swat/help/Samba-HOWTO-Collection/index.html"/>
435 </para>
436 </listitem>
437 <listitem>
438 <para>Samba-3 by Example
439 <ulink url="file:///usr/share/samba/swat/help/Samba-Guide/index.html"/>
440 </para>
441 </listitem>
442 <listitem>
443 <para>The Samba-3 man Pages
444 <ulink url="file:///usr/share/samba/swat/help/samba.7.html"/></para>
445 </listitem>
446 </itemizedlist>
447
448 </sect4>
[99ef1fc]449
450 </sect3>
451
452 <sect3 id="samba3-swat-config">
453 <title>Configuring SWAT</title>
454
455 <para>The built in SWAT (<application>Samba</application> Web
456 Administration Tool) utility can be used for basic configuration of
457 the <application>Samba</application> installation, but because it may
[bfb7882]458 be inconvenient, undesirable or perhaps even impossible to gain
[99ef1fc]459 access to the console, BLFS recommends setting up access to SWAT using
[fc290c7]460 <application>Stunnel</application>. Without
461 <application>Stunnel</application>, the
462 <systemitem class="username">root</systemitem> password is transmitted
463 in clear text over the wire, and is considered an unacceptable security
464 risk. After considering the security implications of using SWAT without
465 <application>Stunnel</application>, and you still wish to implement SWAT
466 without it, instructions are provided at this end of this section.</para>
[99ef1fc]467
468 <indexterm zone="samba3 samba3-swat-config">
469 <primary sortas="g-SWAT">SWAT</primary>
470 </indexterm>
471
[fc290c7]472 <sect4>
473 <title>Setting up SWAT using Stunnel</title>
[99ef1fc]474
[fc290c7]475 <para>First install, or ensure you have already installed, the
476 <xref linkend="stunnel"/> package.</para>
[99ef1fc]477
[fc290c7]478 <para>Next you must add entries to <filename>/etc/services</filename>
479 and modify the <command>inetd</command>/<command>xinetd</command>
480 configuration.</para>
[99ef1fc]481
[fc290c7]482 <indexterm zone="samba3 samba3-swat-config">
483 <primary sortas="e-etc-services">/etc/services</primary>
484 </indexterm>
485
486 <indexterm zone="samba3 samba3-swat-config">
487 <primary sortas="e-etc-inetd.conf">/etc/inetd.conf</primary>
488 </indexterm>
489
490 <indexterm zone="samba3 samba3-swat-config">
491 <primary sortas="e-etc-xinetd.conf">/etc/xinetd.conf</primary>
492 </indexterm>
[99ef1fc]493
[fc290c7]494 <para>Add swat and swat_tunnel entries to
495 <filename>/etc/services</filename> with the following commands issued
496 as the <systemitem class="username">root</systemitem> user:</para>
[99ef1fc]497
498<screen role="root"><userinput>echo "swat 901/tcp" &gt;&gt; /etc/services &amp;&amp;
499echo "swat_tunnel 902/tcp" &gt;&gt; /etc/services</userinput></screen>
500
[fc290c7]501 <para>If <command>inetd</command> is used, the following command will
502 add the swat_tunnel entry to <filename>/etc/inetd.conf</filename> (as
503 user <systemitem class="username">root</systemitem>):</para>
[99ef1fc]504
505<screen role="root"><userinput>echo "swat_tunnel stream tcp nowait.400 root /usr/sbin/swat swat" \
506 &gt;&gt; /etc/inetd.conf</userinput></screen>
507
[fc290c7]508 <para>Issue a <command>killall -HUP inetd</command> to reread the
509 changed <filename>inetd.conf</filename> file.</para>
[99ef1fc]510
[fc290c7]511 <para>If you use <command>xinetd</command>, the following command will
512 create the <application>Samba</application> file as
513 <filename>/etc/xinetd.d/swat_tunnel</filename> (you may need to modify
514 or remove the <quote>only_from</quote> line to include the desired
515 host[s]):</para>
[99ef1fc]516
517<screen role="root"><userinput>cat &gt;&gt; /etc/xinetd.d/swat_tunnel &lt;&lt; "EOF"
518<literal># Begin /etc/xinetd.d/swat_tunnel
[1f672c1]519
[2bfe939]520service swat_tunnel
[0931098]521{
[2bfe939]522 port = 902
[0931098]523 socket_type = stream
524 wait = no
525 only_from = 127.0.0.1
526 user = root
527 server = /usr/sbin/swat
528 log_on_failure += USERID
529}
[1f672c1]530
[99ef1fc]531# End /etc/xinetd.d/swat_tunnel</literal>
532EOF</userinput></screen>
[0931098]533
[fc290c7]534 <indexterm zone="samba3 samba3-swat-config">
535 <primary sortas="e-etc-xinetd.d-swat-tunnel">/etc/xinetd.d/swat_tunnel</primary>
536 </indexterm>
[2a3fc53]537
[fc290c7]538 <para>Issue a <command>killall -HUP xinetd</command> to read the new
539 <filename>/etc/xinetd.d/swat_tunnel</filename> file.</para>
[0931098]540
[fc290c7]541 <para>Next, you must add an entry for the swat service to the
542 <filename>/etc/stunnel/stunnel.conf</filename> file (as user
543 <systemitem class="username">root</systemitem>):</para>
[2a3fc53]544
[fc290c7]545 <indexterm zone="samba3 samba3-swat-config">
546 <primary sortas="e-etc-stunnel-stunnel.conf">/etc/stunnel/stunnel.conf</primary>
547 </indexterm>
[2bfe939]548
[99ef1fc]549<screen role="root"><userinput>cat &gt;&gt; /etc/stunnel/stunnel.conf &lt;&lt; "EOF"
550<literal>[swat]
[2bfe939]551accept = 901
[a8ecf657]552connect = 902
553TIMEOUTclose = 1</literal>
[736ede9]554
[99ef1fc]555EOF</userinput></screen>
556
[fc290c7]557 <para>Restart the <command>stunnel</command> daemon using the following
558 command as the <systemitem class="username">root</systemitem> user:</para>
[736ede9]559
[99ef1fc]560<screen role="root"><userinput>/etc/rc.d/init.d/stunnel restart</userinput></screen>
561
562 <para>SWAT can be launched by pointing your web browser to
[3cb0c57]563 <uri>https://<replaceable>&lt;CA_DN_field&gt;</replaceable>:901</uri>.
[99ef1fc]564 Substitute the hostname listed in the DN field of the CA certificate
565 used with <application>Stunnel</application> for
[3cb0c57]566 <replaceable>&lt;CA_DN_field&gt;</replaceable>.</para>
[99ef1fc]567
[fc290c7]568 </sect4>
569
570 <sect4>
571 <title>Setting up SWAT without Stunnel</title>
572
573 <warning>
574 <para>BLFS does not recommend using these procedures because of the
575 security risk involved. However, in a home network environment and
[823b1a3]576 disclosure of the <systemitem class='username'>root</systemitem>
577 password is an acceptable risk, the following
[fc290c7]578 instructions are provided for your convenience.</para>
579 </warning>
580
581 <para>Add a swat entry to <filename>/etc/services</filename> with the
[bccbdaea]582 following command issued as the
[fc290c7]583 <systemitem class='username'>root</systemitem> user:</para>
584
585<screen role='root'><userinput>echo "swat 901/tcp" &gt;&gt; /etc/services</userinput></screen>
586
587 <para>If <command>inetd</command> is used, the following command
[6f19a68e]588 issued as the <systemitem class='username'>root</systemitem> user will
[fc290c7]589 add a swat entry to the <filename>/etc/inetd.conf</filename> file:</para>
590
591<screen role='root'><userinput>echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" \
592 &gt;&gt; /etc/inetd.conf</userinput></screen>
593
594 <para>Issue a <command>killall -HUP inetd</command> to reread the
595 changed <filename>inetd.conf</filename> file.</para>
596
597 <para>If <command>xinetd</command> is used, the following command
598 issued as the <systemitem class='username'>root</systemitem> user
[bccbdaea]599 will create an <filename>/etc/xinetd.d/swat</filename> file:</para>
[fc290c7]600
601<screen role='root'><userinput>cat &gt;&gt; /etc/xinetd.d/swat &lt;&lt; "EOF"
602<literal># Begin /etc/xinetd.d/swat
603
604service swat
605{
606 port = 901
607 socket_type = stream
608 wait = no
609 only_from = 127.0.0.1
610 user = root
611 server = /usr/sbin/swat
612 log_on_failure += USERID
613}
614
615# End /etc/xinetd.d/swat</literal>
616EOF</userinput></screen>
617
618 <para>Issue a <command>killall -HUP xinetd</command> to read the
619 new <filename>/etc/xinetd.d/swat</filename> file.</para>
620
621 <para>SWAT can be launched by pointing your web browser to
622 http://localhost:901.</para>
623
624 </sect4>
625
626 </sect3>
627
628 <sect3>
629 <title/>
630
[99ef1fc]631 <note>
632 <para>If you linked <application>Linux-PAM</application> into the
633 <application>Samba</application> build, you'll need to create an
634 <filename>/etc/pam.d/samba</filename> file.</para>
635 </note>
636
637 <indexterm zone="samba3 samba3-swat-config">
638 <primary sortas="e-etc-pam.d-samba">/etc/pam.d/samba</primary>
639 </indexterm>
640
641 </sect3>
642
643 <sect3 id="samba3-init">
644 <title>Boot Script</title>
645
646 <para>For your convenience, boot scripts have been provided for
647 <application>Samba</application>. There are two included in the
[5254d12]648 <xref linkend="bootscripts"/> package. The first,
[99ef1fc]649 <filename>samba</filename>, will start the <command>smbd</command>
650 and <command>nmbd</command> daemons needed to provide SMB/CIFS
651 services. The second script, <filename>winbind</filename>, starts
652 the <command>winbindd</command> daemon, used for providing Windows
653 domain services to Linux clients.</para>
654
655 <indexterm zone="samba3 samba3-init">
656 <primary sortas="f-samba">samba</primary>
657 </indexterm>
658
659 <indexterm zone="samba3 samba3-init">
660 <primary sortas="f-winbind">winbind</primary>
661 </indexterm>
662
[fc290c7]663 <para>The default <application>Samba</application> installation uses the
664 <systemitem class='username'>nobody</systemitem> user for guest access
665 to the server. This can be overridden by setting the
666 <option>guest account =</option> parameter in the
667 <filename>/etc/samba/smb.conf</filename> file. If you utilize the
668 <option>guest account =</option> parameter, ensure this user exists in
669 the <filename>/etc/passwd</filename> file. To use the default user,
670 issue the following commands as the
671 <systemitem class='username'>root</systemitem> user:</para>
672
673<screen><userinput>groupadd -g 99 nogroup &amp;&amp;
674useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \
675 -s /bin/false -u 99 nobody</userinput></screen>
676
[99ef1fc]677 <para>Install the <filename>samba</filename> script with the following
678 command issued as the <systemitem class="username">root</systemitem>
679 user:</para>
680
681<screen role="root"><userinput>make install-samba</userinput></screen>
682
683 <para>If you also need the <filename>winbind</filename>
684 script:</para>
685
686<screen role="root"><userinput>make install-winbind</userinput></screen>
687
688 </sect3>
689
690 </sect2>
691
692 <sect2 role="content">
693 <title>Contents</title>
694
695 <segmentedlist>
696 <segtitle>Installed Programs</segtitle>
697 <segtitle>Installed Libraries</segtitle>
698 <segtitle>Installed Directories</segtitle>
699
[a8ecf657]700<!--newprogs: eventlogadm smbget-->
701
[99ef1fc]702 <seglistitem>
[a8ecf657]703 <seg>eventlogadm, findsmb, mount.smbfs, net, nmbd, nmblookup,
704 ntlm_auth, pdbedit, profiles, rpcclient, smbcacls, smbclient,
705 smbcontrol, smbcquotas, smbd, smbget, smbmnt, smbmount, smbpasswd,
706 smbspool, smbstatus, smbtar, smbtree, smbumount, swat, tdbbackup,
707 tdbdump, tdbtool, testparm, testprns, wbinfo, and winbindd</seg>
708 <seg>libnss_winbind.so, libnss_wins.so, libsmbclient.so, libmsrpc.so,
709 the pam_winbind.so PAM library and assorted character set, filesystem
710 and support modules.</seg>
711 <seg>/etc/samba, /usr/lib/python2.4/site-packages/samba,
712 /usr/lib/samba, /usr/share/doc/samba-&samba3-version;,
713 /usr/share/samba, /var/lib/samba and /var/log/samba</seg>
[99ef1fc]714 </seglistitem>
715 </segmentedlist>
716
717 <variablelist>
718 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
719 <?dbfo list-presentation="list"?>
720 <?dbhtml list-presentation="table"?>
721
[a8ecf657]722 <varlistentry id="eventlogadm">
723 <term><command>eventlogadm</command></term>
724 <listitem>
725 <para>is used to write records to eventlogs from STDIN, add the
726 specified source and DLL eventlog registry entries and display the
727 active eventlog names (from <filename>smb.conf</filename>).</para>
728 <indexterm zone="samba3 eventlogadm">
729 <primary sortas="b-eventlogadm">eventlogadm</primary>
730 </indexterm>
731 </listitem>
732 </varlistentry>
733
[99ef1fc]734 <varlistentry id="findsmb">
735 <term><command>findsmb</command></term>
736 <listitem>
737 <para>lists information about machines that respond to
738 SMB name queries on a subnet.</para>
739 <indexterm zone="samba3 findsmb">
740 <primary sortas="b-findsmb">findsmb</primary>
741 </indexterm>
742 </listitem>
743 </varlistentry>
744
745 <varlistentry id="mount.smbfs">
746 <term><command>mount.smbfs</command></term>
747 <listitem>
[e75747d1]748 <para>is a symlink to <command>smbmount</command> which provides
[99ef1fc]749 <command>/bin/mount</command> with a way to mount remote Windows
750 (or <application>Samba</application>) fileshares.</para>
751 <indexterm zone="samba3 mount.smbfs">
752 <primary sortas="b-mount.smbfs">mount.smbfs</primary>
753 </indexterm>
754 </listitem>
755 </varlistentry>
756
757 <varlistentry id="net">
758 <term><command>net</command></term>
759 <listitem>
760 <para>is a tool for administration of
761 <application>Samba</application> and remote CIFS servers, similar
762 to the <command>net</command> utility for DOS/Windows.</para>
763 <indexterm zone="samba3 net">
764 <primary sortas="b-net">net</primary>
765 </indexterm>
766 </listitem>
767 </varlistentry>
768
769 <varlistentry id="nmbd">
770 <term><command>nmbd</command></term>
771 <listitem>
772 <para>is the <application>Samba</application>
773 NetBIOS name server.</para>
774 <indexterm zone="samba3 nmbd">
775 <primary sortas="b-nmbd">nmbd</primary>
776 </indexterm>
777 </listitem>
778 </varlistentry>
779
780 <varlistentry id="nmblookup">
781 <term><command>nmblookup</command></term>
782 <listitem>
783 <para>is used to query NetBIOS names and map
784 them to IP addresses.</para>
785 <indexterm zone="samba3 nmblookup">
786 <primary sortas="b-nmblookup">nmblookup</primary>
787 </indexterm>
788 </listitem>
789 </varlistentry>
790
791 <varlistentry id="ntlm_auth">
792 <term><command>ntlm_auth</command></term>
793 <listitem>
794 <para>is a tool to allow external access to Winbind's
795 NTLM authentication function.</para>
796 <indexterm zone="samba3 ntlm_auth">
797 <primary sortas="b-ntlm_auth">ntlm_auth</primary>
798 </indexterm>
799 </listitem>
800 </varlistentry>
801
802 <varlistentry id="pdbedit">
803 <term><command>pdbedit</command></term>
804 <listitem>
805 <para>is a tool used to manage the SAM database.</para>
806 <indexterm zone="samba3 pdbedit">
807 <primary sortas="b-pdbedit">pdbedit</primary>
808 </indexterm>
809 </listitem>
810 </varlistentry>
811
812 <varlistentry id="profiles">
813 <term><command>profiles</command></term>
814 <listitem>
815 <para>is a utility that reports and changes SIDs in Windows
816 registry files. It currently only supports Windows NT.</para>
817 <indexterm zone="samba3 profiles">
818 <primary sortas="b-profiles">profiles</primary>
819 </indexterm>
820 </listitem>
821 </varlistentry>
822
823 <varlistentry id="rpcclient">
824 <term><command>rpcclient</command></term>
825 <listitem>
826 <para>is used to execute MS-RPC client side functions.</para>
827 <indexterm zone="samba3 rpcclient">
828 <primary sortas="b-rpcclient">rpcclient</primary>
829 </indexterm>
830 </listitem>
831 </varlistentry>
832
833 <varlistentry id="smbcacls">
834 <term><command>smbcacls</command></term>
835 <listitem>
836 <para>is used to manipulate Windows NT access control lists.</para>
837 <indexterm zone="samba3 smbcacls">
838 <primary sortas="b-smbcacls">smbcacls</primary>
839 </indexterm>
840 </listitem>
841 </varlistentry>
842
843 <varlistentry id="smbclient">
844 <term><command>smbclient</command></term>
845 <listitem>
846 <para>is a SMB/CIFS access utility, similar to FTP.</para>
847 <indexterm zone="samba3 smbclient">
848 <primary sortas="b-smbclient">smbclient</primary>
849 </indexterm>
850 </listitem>
851 </varlistentry>
852
853 <varlistentry id="smbcontrol">
854 <term><command>smbcontrol</command></term>
855 <listitem>
856 <para>is used to control running <command>smbd</command>,
857 <command>nmbd</command> and <command>winbindd</command>
858 daemons.</para>
859 <indexterm zone="samba3 smbcontrol">
860 <primary sortas="b-smbcontrol">smbcontrol</primary>
861 </indexterm>
862 </listitem>
863 </varlistentry>
864
865 <varlistentry id="smbcquotas">
866 <term><command>smbcquotas</command></term>
867 <listitem>
868 <para>is used to manipulate Windows NT quotas on
869 SMB file shares.</para>
870 <indexterm zone="samba3 smbcquotas">
871 <primary sortas="b-smbcquotas">smbcquotas</primary>
872 </indexterm>
873 </listitem>
874 </varlistentry>
875
876 <varlistentry id="smbd">
877 <term><command>smbd</command></term>
878 <listitem>
879 <para>is the main <application>Samba</application> daemon which
880 provides SMB/CIFS services to clients.</para>
881 <indexterm zone="samba3 smbd">
882 <primary sortas="b-smbd">smbd</primary>
883 </indexterm>
884 </listitem>
885 </varlistentry>
886
[a8ecf657]887 <varlistentry id="smbget">
888 <term><command>smbget</command></term>
889 <listitem>
890 <para>is a simple utility with <command>wget</command>-like
891 semantics, that can download files from SMB servers. You can specify
892 the files you would like to download on the command-line.</para>
893 <indexterm zone="samba3 smbget">
894 <primary sortas="b-smbget">smbget</primary>
895 </indexterm>
896 </listitem>
897 </varlistentry>
898
[99ef1fc]899 <varlistentry id="smbmnt">
900 <term><command>smbmnt</command></term>
901 <listitem>
902 <para>is a helper application used by the
903 <command>smbmount</command> program to do the actual mounting of
[823b1a3]904 SMB shares. It can be installed setuid
905 <systemitem class='username'>root</systemitem> if you want
[e615d9b]906 unprivileged users to be able to mount their SMB shares.</para>
[99ef1fc]907 <indexterm zone="samba3 smbmnt">
908 <primary sortas="b-smbmnt">smbmnt</primary>
909 </indexterm>
910 </listitem>
911 </varlistentry>
912
913 <varlistentry id="smbmount">
914 <term><command>smbmount</command></term>
915 <listitem>
916 <para>is usually invoked as <command>mount.smbfs</command> by the
917 <command>mount</command> command when using the
918 <parameter>-t smbfs</parameter> option, mounts a Linux SMB
919 filesystem.</para>
920 <indexterm zone="samba3 smbmount">
921 <primary sortas="b-smbmount">smbmount</primary>
922 </indexterm>
923 </listitem>
924 </varlistentry>
925
926 <varlistentry id="smbpasswd">
927 <term><command>smbpasswd</command></term>
928 <listitem>
929 <para>changes a user's <application>Samba</application>
930 password.</para>
931 <indexterm zone="samba3 smbpasswd">
932 <primary sortas="b-smbpasswd">smbpasswd</primary>
933 </indexterm>
934 </listitem>
935 </varlistentry>
936
937 <varlistentry id="smbspool">
938 <term><command>smbspool</command></term>
939 <listitem>
940 <para>sends a print job to an SMB printer.</para>
941 <indexterm zone="samba3 smbspool">
942 <primary sortas="b-smbspool">smbspool</primary>
943 </indexterm>
944 </listitem>
945 </varlistentry>
946
947 <varlistentry id="smbstatus">
948 <term><command>smbstatus</command></term>
949 <listitem>
950 <para>reports current <application>Samba</application>
951 connections.</para>
952 <indexterm zone="samba3 smbstatus">
953 <primary sortas="b-smbstatus">smbstatus</primary>
954 </indexterm>
955 </listitem>
956 </varlistentry>
957
958 <varlistentry id="smbtar">
959 <term><command>smbtar</command></term>
960 <listitem>
961 <para>is a shell script used for backing up SMB/CIFS shares
962 directly to Linux tape drives or a file.</para>
963 <indexterm zone="samba3 smbtar">
964 <primary sortas="b-smbtar">smbtar</primary>
965 </indexterm>
966 </listitem>
967 </varlistentry>
968
969 <varlistentry id="smbtree">
970 <term><command>smbtree</command></term>
971 <listitem>
972 <para>is a text-based SMB network browser.</para>
973 <indexterm zone="samba3 smbtree">
974 <primary sortas="b-smbtree">smbtree</primary>
975 </indexterm>
976 </listitem>
977 </varlistentry>
978
979 <varlistentry id="smbumount">
980 <term><command>smbumount</command></term>
981 <listitem>
[e615d9b]982 <para>is used by unprivileged users to unmount SMB filesystems,
[99ef1fc]983 provided that it is setuid root.</para>
984 <indexterm zone="samba3 smbumount">
985 <primary sortas="b-smbumount">smbumount</primary>
986 </indexterm>
987 </listitem>
988 </varlistentry>
989
990 <varlistentry id="swat">
991 <term><command>swat</command></term>
992 <listitem>
993 <para>is the <application>Samba</application> Web Administration
994 Tool.</para>
995 <indexterm zone="samba3 swat">
996 <primary sortas="b-swat">swat</primary>
997 </indexterm>
998 </listitem>
999 </varlistentry>
1000
1001 <varlistentry id="tdbbackup">
1002 <term><command>tdbbackup</command></term>
1003 <listitem>
1004 <para>is a tool for backing up or validating the integrity of
1005 <application>Samba</application> <filename>.tdb</filename>
1006 files.</para>
1007 <indexterm zone="samba3 tdbbackup">
1008 <primary sortas="b-tdbbackup">tdbbackup</primary>
1009 </indexterm>
1010 </listitem>
1011 </varlistentry>
1012
1013 <varlistentry id="tdbdump">
1014 <term><command>tdbdump</command></term>
1015 <listitem>
1016 <para> is a tool used to print the contents of a
1017 <application>Samba</application> <filename>.tdb</filename>
1018 file.</para>
1019 <indexterm zone="samba3 tdbdump">
1020 <primary sortas="b-tdbdump">tdbdump</primary>
1021 </indexterm>
1022 </listitem>
1023 </varlistentry>
1024
1025 <varlistentry id="tdbtool">
1026 <term><command>tdbtool</command></term>
1027 <listitem>
1028 <para>is a tool which allows simple database manipulation from the
1029 command line.</para>
1030 <indexterm zone="samba3 tdbtool">
1031 <primary sortas="b-tdbtool">tdbtool</primary>
1032 </indexterm>
1033 </listitem>
1034 </varlistentry>
1035
1036 <varlistentry id="testparm">
1037 <term><command>testparm</command></term>
1038 <listitem>
1039 <para>checks an <filename>smb.conf</filename> file for proper
1040 syntax.</para>
1041 <indexterm zone="samba3 testparm">
1042 <primary sortas="b-testparm">testparm</primary>
1043 </indexterm>
1044 </listitem>
1045 </varlistentry>
1046
1047 <varlistentry id="testprns">
1048 <term><command>testprns</command></term>
1049 <listitem>
1050 <para>tests printer names.</para>
1051 <indexterm zone="samba3 testprns">
1052 <primary sortas="b-testprns">testprns</primary>
1053 </indexterm>
1054 </listitem>
1055 </varlistentry>
1056
1057 <varlistentry id="wbinfo">
1058 <term><command>wbinfo</command></term>
1059 <listitem>
1060 <para>queries a running <command>winbindd</command> daemon.</para>
1061 <indexterm zone="samba3 wbinfo">
1062 <primary sortas="b-wbinfo">wbinfo</primary>
1063 </indexterm>
1064 </listitem>
1065 </varlistentry>
1066
1067 <varlistentry id="winbindd">
1068 <term><command>winbindd</command></term>
1069 <listitem>
1070 <para>resolves names from Windows NT servers.</para>
1071 <indexterm zone="samba3 winbindd">
1072 <primary sortas="b-winbindd">winbindd</primary>
1073 </indexterm>
1074 </listitem>
1075 </varlistentry>
1076
1077 </variablelist>
1078
1079 </sect2>
1080
1081</sect1>
Note: See TracBrowser for help on using the repository browser.