source: server/other/samba3.xml@ 2bfe939

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2bfe939 was 2bfe939, checked in by Randy McMurchy <randy@…>, 20 years ago

Updated to Samba-3.0.7

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

  • Property mode set to 100644
File size: 18.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7<!ENTITY samba3-download-http "http://us1.samba.org/samba/ftp/samba-&samba3-version;.tar.gz">
8<!ENTITY samba3-download-ftp "ftp://ftp.samba.org/pub/samba/samba-&samba3-version;.tar.gz">
9<!ENTITY samba3-size "15.0 MB">
10<!ENTITY samba3-buildsize "136 MB">
11<!ENTITY samba3-time "2.04 SBU">
12]>
13
14<sect1 id="samba3" xreflabel="Samba-&samba3-version;">
15<sect1info>
16<othername>$LastChangedBy$</othername>
17<date>$Date$</date>
18</sect1info>
19<?dbhtml filename="samba3.html"?>
20<title>Samba-&samba3-version;</title>
21
22<sect2>
23<title>Introduction to <application>Samba</application></title>
24
25<para>The <application>Samba</application> package provides file and print
26services to <acronym>SMB</acronym>/<acronym>CIFS</acronym> clients and
27Windows networking to Linux clients. <application>Samba</application> can also
28be configured as a Windows NT 4.0 Domain Controller replacement
29(with caveats working with NT <acronym>PDC</acronym>'s and
30<acronym>BDC</acronym>'s), a file/print server acting as a member of a
31Windows NT 4.0 or Active Directory domain and a NetBIOS (rfc1001/1002)
32nameserver (which amongst other things provides
33<acronym>LAN</acronym> browsing support).</para>
34
35<sect3><title>Package information</title>
36<itemizedlist spacing='compact'>
37<listitem><para>Download (HTTP): <ulink url="&samba3-download-http;"/></para></listitem>
38<listitem><para>Download (FTP): <ulink url="&samba3-download-ftp;"/></para></listitem>
39<listitem><para>Download size: &samba3-size;</para></listitem>
40<listitem><para>Estimated disk space required: &samba3-buildsize;</para></listitem>
41<listitem><para>Estimated build time: &samba3-time;</para></listitem></itemizedlist>
42</sect3>
43
44<!-- <sect3><title>Additional downloads</title>
45<itemizedlist spacing='compact'>
46<listitem><para>Maintainer Recommended Patch: <ulink
47url="&patch-root;/samba-&samba3-version;-maintainer-1.patch"/></para></listitem>
48</itemizedlist>
49</sect3> -->
50
51<sect3>
52<title><application>Samba</application> dependencies</title>
53<sect4>
54<title>Optional</title>
55<para><xref linkend="popt"/>,
56<xref linkend="Linux_PAM"/>,
57<xref linkend="openldap"/>,
58<xref linkend="cups"/>,
59<xref linkend="heimdal"/> or <xref linkend="mitkrb"/>,
60<xref linkend="libxml2"/>,
61<xref linkend="mysql"/> or <xref linkend="postgresql"/>,
62<xref linkend="Python"/>,
63<xref linkend="xinetd"/>,
64<ulink url="http://valgrind.kde.org/">Valgrind</ulink> and
65<xref linkend="stunnel"/> (used to encrypt access to SWAT)</para>
66</sect4>
67</sect3>
68
69</sect2>
70
71<sect2>
72<title>Installation of <application>Samba</application></title>
73
74<para>Install <application>Samba</application> by running the following
75commands:</para>
76
77<screen><userinput><command>cd source &amp;&amp;
78install -d /var/cache/samba &amp;&amp;
79./configure \
80 --prefix=/usr \
81 --sysconfdir=/etc \
82 --localstatedir=/var \
83 --with-piddir=/var/run \
84 --with-fhs \
85 --with-smbmount &amp;&amp;
86make &amp;&amp;
87make install &amp;&amp;
88chmod 644 /usr/include/libsmbclient.h &amp;&amp;
89install -m755 nsswitch/libnss_win{s,bind}.so /lib &amp;&amp;
90ln -sf libnss_winbind.so /lib/libnss_winbind.so.2 &amp;&amp;
91ln -sf libnss_wins.so /lib/libnss_wins.so.2 &amp;&amp;
92cp ../examples/smb.conf.default /etc/samba &amp;&amp;
93install -m644 ../docs/*.pdf /usr/share/samba
94if [ -f nsswitch/pam_winbind.so ]; then
95 install -m755 nsswitch/pam_winbind.so /lib/security
96fi</command></userinput></screen>
97
98<note><para>You may want to run <command>configure</command> with the
99<parameter>--help</parameter> parameter. There may be other parameters
100needed to take advantage of the optional dependencies.</para></note>
101
102</sect2>
103
104<sect2>
105<title>Command explanations</title>
106
107<para><command>install -d /var/cache/samba</command>: This directory is
108needed for proper operation of the <command>smbd</command> and
109<command>nmbd</command> daemons.</para>
110
111<para><parameter>--sysconfdir=/etc</parameter>: Sets the configuration
112file directory to avoid the default of
113<filename class="directory">/usr/etc</filename>.</para>
114
115<para><parameter>--localstatedir=/var</parameter>: Sets the variable
116data directory to avoid the default of
117<filename class="directory">/usr/var</filename>.</para>
118
119<para><option>--with-fhs</option>: Assigns all other file paths in a manner
120compliant with the Filesystem Hierarchy Standard
121(<acronym>FHS</acronym>).</para>
122
123<para><option>--with-smbmount</option>: Orders the creation of an extra
124binary for use by the <command>mount</command> command so that mounting remote
125<acronym>SMB</acronym> (Windows) shares becomes no more complex than mounting
126remote <acronym>NFS</acronym> shares.</para>
127
128<para><option>--with-pam</option>: Use this parameter to link
129<application>Linux-<acronym>PAM</acronym></application> into the build. This
130also builds the <filename class='libraryfile'>pam_winbind.so</filename>
131<application><acronym>PAM</acronym></application> module. You can find
132instructions on how to configure and use the module by running
133<command>man winbindd</command>.</para>
134
135<para><command>install -m755 nsswitch/libnss_win{s,bind}.so /lib</command>:
136The nss libraries are not installed by default. If you intend to use
137winbindd for domain auth, and/or <acronym>WINS</acronym> name resolution,
138you need these libraries.</para>
139
140<para><command>ln -sf libnss_winbind.so /lib/libnss_winbind.so.2</command>
141and <command>ln -sf libnss_wins.so /lib/libnss_wins.so.2</command>:
142These symlinks are required by glibc to use the nss libraries.</para>
143
144<para><command>cp ../examples/smb.conf.default /etc/samba</command>:
145This copies a default <filename>smb.conf </filename>into
146<filename>/etc/samba</filename>. This sample configuration will not
147work unless edited for your site, and renamed
148<filename>smb.conf</filename>.</para>
149
150</sect2>
151
152<sect2>
153<title>Configuring <application>Samba</application></title>
154
155<sect3><title>Configuration overview and available documentation</title>
156
157<para>Due to the complexity and the many various uses for
158<application>Samba</application>, complete configuration is well beyond the
159scope of the BLFS book. Advanced configurations including setting up Primary
160and Backup Domain Controllers are advanced topics and cannot be adequately
161covered in BLFS (it should be noted, however, that a
162<application>Samba</application> BDC cannot be used as a fallback for a
163<application>Windows</application> <acronym>PDC</acronym>, and conversely, a
164<application>Windows</application> <acronym>BDC</acronym> cannot be used as a
165fallback for a <application>Samba</application> <acronym>PDC</acronym>). Many
166complete books have been written on these topics alone.</para>
167
168<para>There is quite a bit of documentation available which covers many of
169these advanced configurations. Point your web browser to the links below to
170view some of the documentation included with the
171<application>Samba</application> package:</para>
172
173<itemizedlist spacing='compact'>
174<listitem><para>Using Samba, 2nd Edition; a popular book published by O'Reilly
175<ulink url="file:///usr/share/samba/swat/using_samba/toc.html"/></para>
176</listitem>
177
178<listitem><para>The Official Samba HOWTO and Reference Guide
179<ulink url="file:///usr/share/samba/swat/help/Samba-HOWTO-Collection/index.html"/></para>
180</listitem>
181
182<listitem><para>Samba-3 by Example
183<ulink url="file:///usr/share/samba/swat/help/Samba-Guide/index.html"/></para>
184</listitem>
185
186<listitem><para>The Samba-3 man Pages
187<ulink url="file:///usr/share/samba/swat/help/samba.7.html"/></para>
188</listitem>
189</itemizedlist>
190</sect3>
191
192<sect3><title>Configuring SWAT</title>
193
194<para>The built in <acronym>SWAT</acronym>
195(<application>Samba</application> Web Administration Tool) utility can be used
196for basic configuration of the <application>Samba</application> installation,
197but because it may be inconvenient, undesireable or perhaps even impossible
198to gain access to the console, BLFS recommends setting up access to
199<acronym>SWAT</acronym> using <application>Stunnel</application>.</para>
200
201<para>First you must add entries to <filename>/etc/services</filename> and
202modify the <command>inetd</command>/<command>xinetd</command>
203configuration.</para>
204
205<para>Add swat and swat_tunnel entries to
206<filename>/etc/services</filename> with the following commands:</para>
207
208<screen><userinput><command>echo "swat 901/tcp" &gt;&gt; /etc/services &amp;&amp;
209echo "swat_tunnel 902/tcp" &gt;&gt; /etc/services</command></userinput></screen>
210
211<para>If <command>inetd</command> is used, the following command will add the
212swat_tunnel entry to <filename>/etc/inetd.conf</filename>: </para>
213
214<screen><userinput><command>echo "swat_tunnel stream tcp nowait.400 root /usr/sbin/swat swat" \
215 &gt;&gt; /etc/inetd.conf</command></userinput></screen>
216<para>Issue a <command>killall -HUP inetd</command> to reread the
217changed <filename>inetd.conf</filename> file.</para>
218
219<para>If <command>xinetd</command> is used, the following command will
220add the swat_tunnel entry to <filename>/etc/xinetd.conf</filename> (you may
221need to modify or remove the <quote>only_from</quote> line to include the
222desired host[s]):</para>
223
224<screen><userinput><command>cat &gt;&gt; /etc/xinetd.conf &lt;&lt; "EOF"</command>
225service swat_tunnel
226{
227 port = 902
228 socket_type = stream
229 wait = no
230 only_from = 127.0.0.1
231 user = root
232 server = /usr/sbin/swat
233 log_on_failure += USERID
234}
235<command>EOF</command></userinput></screen>
236
237<para>Issue a <command>killall -HUP xinetd</command> to reread the
238changed <filename>xinetd.conf</filename> file.</para>
239
240<para>Next, you must add an entry for the swat service to the
241<filename>/etc/stunnel/stunnel.conf</filename> file:</para>
242
243<screen><userinput><command>cat &gt;&gt; /etc/stunnel/stunnel.conf &lt;&lt; "EOF"</command>
244[swat]
245accept = 901
246connect = 902
247
248<command>EOF</command></userinput></screen>
249
250<para>Restart the <command>stunnel</command> daemon using the following
251command:</para>
252
253<screen><userinput><command>/etc/rc.d/init.d/stunnel restart</command></userinput></screen>
254
255<para><acronym>SWAT</acronym> can be launched by pointing your web browser to
256<userinput>https://<replaceable>[CA_DN_field]</replaceable>:901</userinput>.
257Substitute the hostname listed in the <acronym>DN</acronym> field of the
258<acronym>CA</acronym> certificate used with
259<application>Stunnel</application> for
260<replaceable>[CA_DN_field]</replaceable>.</para>
261
262<note><para>If you linked
263<application>Linux-<acronym>PAM</acronym></application> into the
264<application>Samba</application> build, you'll need to create an
265<filename>/etc/pam.d/samba</filename> file.</para></note>
266</sect3>
267
268<sect3><title>Printing to <acronym>SMB</acronym> clients</title>
269
270<para>If you use <application><acronym>CUPS</acronym></application> for print
271services, and you wish to print to a printer attached to an
272<acronym>SMB</acronym> client, you need to create an <acronym>SMB</acronym>
273backend device. To create the device, issue the following command:</para>
274
275<screen><userinput><command>ln -sf /usr/bin/smbspool /usr/lib/cups/backend/smb</command></userinput></screen>
276</sect3>
277
278<sect3><title>Installing bootscripts</title>
279
280<para>For your convenience, boot scripts have been provided for
281<application>Samba</application>. There are two included in the
282<xref linkend="intro-important-bootscripts"/> package. The first,
283<filename>samba</filename>, will start the <command>smbd</command> and
284<command>nmbd</command> daemons needed to provide
285<acronym>SMB</acronym>/<acronym>CIFS</acronym> services. The second
286script, <filename>winbind</filename>, starts the <command>winbindd</command>
287daemon, used for providing Windows domain services to Linux clients.</para>
288
289<para>Install the <filename>samba</filename> script with the following
290command:</para>
291
292<screen><userinput><command>make install-samba</command></userinput></screen>
293
294<para>If you also need the <filename>winbind</filename> script:</para>
295
296<screen><userinput><command>make install-winbind</command></userinput></screen>
297</sect3>
298
299</sect2>
300
301<sect2>
302<title>Contents</title>
303
304<para>The <application>Samba</application> package contains
305<command>findsmb</command>,
306<command>make_smbcodepage</command>,
307<command>make_unicodemap</command>,
308<command>mount.smbfs</command>,
309<command>net</command>,
310<command>nmbd</command>,
311<command>nmblookup</command>,
312<command>ntlm_auth</command>,
313<command>pdbedit</command>,
314<command>profiles</command>,
315<command>rpcclient</command>,
316<command>smbcacls</command>,
317<command>smbclient</command>,
318<command>smbcontrol</command>,
319<command>smbcquotas</command>,
320<command>smbd</command>,
321<command>smbmnt</command>,
322<command>smbmount</command>,
323<command>smbpasswd</command>,
324<command>smbspool</command>,
325<command>smbstatus</command>,
326<command>smbtar</command>,
327<command>smbtree</command>,
328<command>smbumount</command>,
329<command>swat</command>,
330<command>tdbbackup</command>,
331<command>tdbdump</command>,
332<command>testparm</command>,
333<command>testprns</command>,
334<command>wbinfo</command> and
335<command>winbindd</command>.</para>
336
337</sect2>
338
339<sect2>
340<title>Description</title>
341<sect3><title>findsmb</title>
342<para><command>findsmb</command> lists information about machines that respond
343to <acronym>SMB</acronym> name queries on a subnet.</para></sect3>
344<sect3><title>make_smbcodepage</title>
345<para><command>make_smbcodepage</command> converts text descriptions of code
346pages to binary code page files and vice versa.</para></sect3>
347<sect3><title>make_unicodemap</title>
348<para><command>make_unicodemap</command> converts text Unicode map files to
349binary, for use in mapping characters to 16 bit Unicode.</para></sect3>
350<sect3><title>mount.smbfs</title>
351<para><command>mount.smbfs</command> provides <command>/bin/mount</command>
352with a way to mount remote Windows (or
353<application>Samba</application>) fileshares.</para></sect3>
354<sect3><title>net</title>
355<para><command>net</command> is a tool for administration of
356<application>Samba</application> and remote <acronym>CIFS</acronym> servers,
357similar to the net utility for <acronym>DOS</acronym>/Windows.</para></sect3>
358<sect3><title>nmbd</title>
359<para><command>nmbd</command> is the <application>Samba</application>
360Net<acronym>BIOS</acronym> name server.</para></sect3>
361<sect3><title>nmblookup</title>
362<para><command>nmblookup</command> is used to query
363Net<acronym>BIOS</acronym> names and map them to <acronym>IP</acronym>
364addresses.</para></sect3>
365<sect3><title>ntlm_auth</title>
366<para><command>ntlm_auth</command> is a tool to allow external access to
367Winbind's <acronym>NTLM</acronym> authentication function.</para></sect3>
368<sect3><title>pdbedit</title>
369<para><command>pdbedit</command> is a tool used to manage the
370<acronym>SAM</acronym> database.</para></sect3>
371<sect3><title>profiles</title>
372<para><command>profiles</command> is a utility that reports and changes
373<acronym>SID</acronym>s in Windows registry files. It currently only supports
374NT.</para></sect3>
375<sect3><title>rpcclient</title>
376<para><command>rpcclient</command> is used to execute
377MS-<acronym>RPC</acronym> client side functions.</para></sect3>
378<sect3><title>smbcacls</title>
379<para><command>smbcacls</command> is used to manipulate NT access control
380lists.</para></sect3>
381<sect3><title>smbclient</title>
382<para><command>smbclient</command> is a <acronym>SMB</acronym>/<acronym>CIFS
383</acronym> access utility, similar to <acronym>FTP</acronym>.</para></sect3>
384<sect3><title>smbcontrol</title>
385<para><command>smbcontrol</command> is used to control running
386<command>smbd</command>, <command>nmbd</command> and
387<command>winbindd</command> daemons.</para></sect3>
388<sect3><title>smbcquotas</title>
389<para><command>smbcquotas</command> is used to manipulate NT quotas on
390<acronym>SMB</acronym> file shares.</para></sect3>
391<sect3><title>smbd</title>
392<para><command>smbd</command> is the main
393<application>Samba</application> daemon.</para></sect3>
394<sect3><title>smbmnt</title>
395<para><command>smbmnt</command> is a helper application used by the
396<command>smbmount</command> program to do the actual mounting of
397<acronym>SMB</acronym> shares. It can be installed setuid root if you want
398normal users to be able to mount their <acronym>SMB</acronym>
399shares.</para></sect3>
400<sect3><title>smbmount</title>
401<para><command>smbmount</command>, usually invoked as
402<command>mount.smbfs</command> by the <command>mount</command> command when
403using the <quote>-t smbfs</quote> option, mounts a Linux <acronym>SMB</acronym>
404filesystem.</para></sect3>
405<sect3><title>smbpasswd</title>
406<para><command>smbpasswd</command> changes a user's
407<application>Samba</application> password.</para></sect3>
408<sect3><title>smbspool</title>
409<para><command>smbspool</command> sends a print job to an
410<acronym>SMB</acronym> printer.</para></sect3>
411<sect3><title>smbstatus</title>
412<para><command>smbstatus</command> reports current
413<application>Samba</application> connections.</para></sect3>
414<sect3><title>smbtar</title>
415<para><command>smbtar</command> is a shell script used for backing up
416<acronym>SMB</acronym>/<acronym>CIFS</acronym> shares directly to Linux tape
417drives or a file.</para></sect3>
418<sect3><title>smbtree</title>
419<para><command>smbtree</command> is a text-based <acronym>SMB</acronym>
420network browser.</para></sect3>
421<sect3><title>smbumount</title>
422<para><command>smbumount</command> is used by normal users to unmount
423<acronym>SMB</acronym> filesystems, provided that it is setuid
424root.</para></sect3>
425<sect3><title>swat</title>
426<para><command>swat</command> is the
427<application>Samba</application> Web Administration Tool.</para></sect3>
428<sect3><title>tdbbackup</title>
429<para><command>tdbbackup</command> is a tool for backing up or validating the
430integrity of <application>Samba</application> <filename>.tdb</filename>
431files.</para></sect3>
432<sect3><title>tdbdump</title>
433<para><command>tdbdump</command> is a tool used to print the contents of a
434<application>Samba</application> <filename>.tdb</filename> file.</para></sect3>
435<sect3><title>testparm</title>
436<para><command>testparm</command> checks an <filename>smb.conf</filename> file
437for proper syntax.</para></sect3>
438<sect3><title>testprns</title>
439<para><command>testprns</command> tests printer names.</para></sect3>
440<sect3><title>wbinfo</title>
441<para><command>wbinfo</command> queries a running <command>winbindd</command>
442daemon.</para></sect3>
443<sect3><title>winbindd</title>
444<para><command>winbindd</command> resolves names from NT servers.</para></sect3>
445
446</sect2>
447
448</sect1>
449
Note: See TracBrowser for help on using the repository browser.