source: server/major/samba3.xml@ ebbb051

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 ebbb051 was ebbb051, checked in by DJ Lucas <dj@…>, 17 years ago

Replaced missing backslash in samba instructions

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

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