source: networking/netprogs/samba3.xml@ c67fbf64

systemd-11177
Last change on this file since c67fbf64 was c67fbf64, checked in by Krejzi <krejzi@…>, 11 years ago

Remove packages that are now in lfs systemd from blfs.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@11302 af4574ff-66df-0310-9fd7-8a98e5e911e0

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