source: server/major/samba3.xml@ a8ecf657

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 a8ecf657 was a8ecf657, checked in by Randy McMurchy <randy@…>, 18 years ago

Updated to Samba-3.0.22

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

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