source: server/major/samba3.xml@ 998dcf8

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

Added libacl as an optional dependency of Samba

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

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