source: networking/netprogs/samba3.xml@ 8569196

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 8569196 was 4716d52, checked in by Andrew Benton <andy@…>, 12 years ago

Removed the python linkend. The python links now point at python2

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

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