source: server/other/samba3.xml@ 3616dc5

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 3616dc5 was 0b5a693, checked in by Randy McMurchy <randy@…>, 19 years ago

Final round of renaming the package-name entities

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3337 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.1 MB">
10<!ENTITY samba3-buildsize "141 MB">
11<!ENTITY samba3-time "2.11 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):
38<ulink url="&samba3-download-http;"/></para></listitem>
39<listitem><para>Download (FTP):
40<ulink url="&samba3-download-ftp;"/></para></listitem>
41<listitem><para>Download size:
42&samba3-size;</para></listitem>
43<listitem><para>Estimated disk space required:
44&samba3-buildsize;</para></listitem>
45<listitem><para>Estimated build time:
46&samba3-time;</para></listitem></itemizedlist>
47</sect3>
48
49<sect3>
50<title><application>Samba</application> dependencies</title>
51<sect4>
52<title>Optional</title>
53<para><xref linkend="popt"/>,
54<xref linkend="Linux_PAM"/>,
55<xref linkend="openldap"/>,
56<xref linkend="cups"/>,
57<xref linkend="heimdal"/> or <xref linkend="mitkrb"/>,
58<xref linkend="libxml2"/>,
59<xref linkend="mysql"/> or <xref linkend="postgresql"/>,
60<xref linkend="python"/>,
61<xref linkend="xinetd"/>,
62<ulink url="http://valgrind.kde.org/">Valgrind</ulink> and
63<xref linkend="stunnel"/> (used to encrypt access to SWAT)</para>
64</sect4>
65</sect3>
66
67</sect2>
68
69<sect2>
70<title>Installation of <application>Samba</application></title>
71
72<para>Install <application>Samba</application> by running the following
73commands:</para>
74
75<screen><userinput><command>cd source &amp;&amp;
76install -d /var/cache/samba &amp;&amp;
77./configure \
78 --prefix=/usr \
79 --sysconfdir=/etc \
80 --localstatedir=/var \
81 --with-piddir=/var/run \
82 --with-fhs \
83 --with-smbmount &amp;&amp;
84make &amp;&amp;
85make install &amp;&amp;
86mv /usr/lib/samba/libsmbclient.so /usr/lib &amp;&amp;
87ln -sf ../libsmbclient.so /usr/lib/samba &amp;&amp;
88chmod 644 /usr/include/libsmbclient.h \
89 /usr/lib/samba/libsmbclient.a &amp;&amp;
90install -m755 nsswitch/libnss_win{s,bind}.so /lib &amp;&amp;
91ln -sf libnss_winbind.so /lib/libnss_winbind.so.2 &amp;&amp;
92ln -sf libnss_wins.so /lib/libnss_wins.so.2 &amp;&amp;
93cp ../examples/smb.conf.default /etc/samba &amp;&amp;
94install -m644 ../docs/*.pdf /usr/share/samba &amp;&amp;
95if [ -f nsswitch/pam_winbind.so ]; then
96 install -m755 nsswitch/pam_winbind.so /lib/security
97fi</command></userinput></screen>
98
99<note><para>You may want to run <command>configure</command> with the
100<parameter>--help</parameter> parameter. There may be other parameters
101needed to take advantage of the optional dependencies.</para></note>
102
103</sect2>
104
105<sect2>
106<title>Command explanations</title>
107
108<para><command>install -d /var/cache/samba</command>: This directory is
109needed for proper operation of the <command>smbd</command> and
110<command>nmbd</command> daemons.</para>
111
112<para><parameter>--sysconfdir=/etc</parameter>: Sets the configuration
113file directory to avoid the default of
114<filename class="directory">/usr/etc</filename>.</para>
115
116<para><parameter>--localstatedir=/var</parameter>: Sets the variable
117data directory to avoid the default of
118<filename class="directory">/usr/var</filename>.</para>
119
120<para><option>--with-fhs</option>: Assigns all other file paths in a manner
121compliant with the Filesystem Hierarchy Standard
122(<acronym>FHS</acronym>).</para>
123
124<para><option>--with-smbmount</option>: Orders the creation of an extra
125binary for use by the <command>mount</command> command so that mounting remote
126<acronym>SMB</acronym> (Windows) shares becomes no more complex than mounting
127remote <acronym>NFS</acronym> shares.</para>
128
129<para><option>--with-pam</option>: Use this parameter to link
130<application>Linux-<acronym>PAM</acronym></application> into the build. This
131also builds the <filename class='libraryfile'>pam_winbind.so</filename>
132<application><acronym>PAM</acronym></application> module. You can find
133instructions on how to configure and use the module by running
134<command>man winbindd</command>.</para>
135
136<para><command>mv /usr/lib/samba/libsmbclient.so ...; ln -sf
137../libsmbclient.so ...</command>: The
138<filename class='libraryfile'>libsmbclient.so</filename> library is needed
139by other packages. This command moves it to a location where other packages
140can find it.</para>
141
142<para><command>install -m755 nsswitch/libnss_win{s,bind}.so /lib</command>:
143The nss libraries are not installed by default. If you intend to use
144winbindd for domain auth, and/or <acronym>WINS</acronym> name resolution,
145you need these libraries.</para>
146
147<para><command>ln -sf libnss_winbind.so /lib/libnss_winbind.so.2</command>
148and <command>ln -sf libnss_wins.so /lib/libnss_wins.so.2</command>:
149These symlinks are required by glibc to use the nss libraries.</para>
150
151<para><command>cp ../examples/smb.conf.default /etc/samba</command>:
152This copies a default <filename>smb.conf </filename>into
153<filename>/etc/samba</filename>. This sample configuration will not
154work unless edited for your site, and renamed
155<filename>smb.conf</filename>.</para>
156
157</sect2>
158
159<sect2>
160<title>Configuring <application>Samba</application></title>
161
162<sect3><title>Configuration overview and available documentation</title>
163
164<para>Due to the complexity and the many various uses for
165<application>Samba</application>, complete configuration is well beyond the
166scope of the BLFS book. Advanced configurations including setting up Primary
167and Backup Domain Controllers are advanced topics and cannot be adequately
168covered in BLFS (it should be noted, however, that a
169<application>Samba</application> BDC cannot be used as a fallback for a
170<application>Windows</application> <acronym>PDC</acronym>, and conversely, a
171<application>Windows</application> <acronym>BDC</acronym> cannot be used as a
172fallback for a <application>Samba</application> <acronym>PDC</acronym>). Many
173complete books have been written on these topics alone.</para>
174
175<para>There is quite a bit of documentation available which covers many of
176these advanced configurations. Point your web browser to the links below to
177view some of the documentation included with the
178<application>Samba</application> package:</para>
179
180<itemizedlist spacing='compact'>
181<listitem><para>Using Samba, 2nd Edition; a popular book published by O'Reilly
182<ulink url="file:///usr/share/samba/swat/using_samba/toc.html"/></para>
183</listitem>
184
185<listitem><para>The Official Samba HOWTO and Reference Guide
186<ulink url="file:///usr/share/samba/swat/help/Samba-HOWTO-Collection/index.html"/></para>
187</listitem>
188
189<listitem><para>Samba-3 by Example
190<ulink url="file:///usr/share/samba/swat/help/Samba-Guide/index.html"/></para>
191</listitem>
192
193<listitem><para>The Samba-3 man Pages
194<ulink url="file:///usr/share/samba/swat/help/samba.7.html"/></para>
195</listitem>
196</itemizedlist>
197</sect3>
198
199<sect3><title>Configuring SWAT</title>
200
201<para>The built in <acronym>SWAT</acronym>
202(<application>Samba</application> Web Administration Tool) utility can be used
203for basic configuration of the <application>Samba</application> installation,
204but because it may be inconvenient, undesireable or perhaps even impossible
205to gain access to the console, BLFS recommends setting up access to
206<acronym>SWAT</acronym> using <application>Stunnel</application>.</para>
207
208<para>First you must add entries to <filename>/etc/services</filename> and
209modify the <command>inetd</command>/<command>xinetd</command>
210configuration.</para>
211
212<para>Add swat and swat_tunnel entries to
213<filename>/etc/services</filename> with the following commands:</para>
214
215<screen><userinput><command>echo "swat 901/tcp" &gt;&gt; /etc/services &amp;&amp;
216echo "swat_tunnel 902/tcp" &gt;&gt; /etc/services</command></userinput></screen>
217
218<para>If <command>inetd</command> is used, the following command will add the
219swat_tunnel entry to <filename>/etc/inetd.conf</filename>: </para>
220
221<screen><userinput><command>echo "swat_tunnel stream tcp nowait.400 root /usr/sbin/swat swat" \
222 &gt;&gt; /etc/inetd.conf</command></userinput></screen>
223<para>Issue a <command>killall -HUP inetd</command> to reread the
224changed <filename>inetd.conf</filename> file.</para>
225
226<para>If <command>xinetd</command> is used, the following command will
227add the swat_tunnel entry to <filename>/etc/xinetd.conf</filename> (you may
228need to modify or remove the <quote>only_from</quote> line to include the
229desired host[s]):</para>
230
231<screen><userinput><command>cat &gt;&gt; /etc/xinetd.conf &lt;&lt; "EOF"</command>
232service swat_tunnel
233{
234 port = 902
235 socket_type = stream
236 wait = no
237 only_from = 127.0.0.1
238 user = root
239 server = /usr/sbin/swat
240 log_on_failure += USERID
241}
242<command>EOF</command></userinput></screen>
243
244<para>Issue a <command>killall -HUP xinetd</command> to reread the
245changed <filename>xinetd.conf</filename> file.</para>
246
247<para>Next, you must add an entry for the swat service to the
248<filename>/etc/stunnel/stunnel.conf</filename> file:</para>
249
250<screen><userinput><command>cat &gt;&gt; /etc/stunnel/stunnel.conf &lt;&lt; "EOF"</command>
251[swat]
252accept = 901
253connect = 902
254
255<command>EOF</command></userinput></screen>
256
257<para>Restart the <command>stunnel</command> daemon using the following
258command:</para>
259
260<screen><userinput><command>/etc/rc.d/init.d/stunnel restart</command></userinput></screen>
261
262<para><acronym>SWAT</acronym> can be launched by pointing your web browser to
263<userinput>https://<replaceable>[CA_DN_field]</replaceable>:901</userinput>.
264Substitute the hostname listed in the <acronym>DN</acronym> field of the
265<acronym>CA</acronym> certificate used with
266<application>Stunnel</application> for
267<replaceable>[CA_DN_field]</replaceable>.</para>
268
269<note><para>If you linked
270<application>Linux-<acronym>PAM</acronym></application> into the
271<application>Samba</application> build, you'll need to create an
272<filename>/etc/pam.d/samba</filename> file.</para></note>
273</sect3>
274
275<sect3><title>Printing to <acronym>SMB</acronym> clients</title>
276
277<para>If you use <application><acronym>CUPS</acronym></application> for print
278services, and you wish to print to a printer attached to an
279<acronym>SMB</acronym> client, you need to create an <acronym>SMB</acronym>
280backend device. To create the device, issue the following command:</para>
281
282<screen><userinput><command>ln -sf /usr/bin/smbspool /usr/lib/cups/backend/smb</command></userinput></screen>
283</sect3>
284
285<sect3><title>Installing bootscripts</title>
286
287<para>For your convenience, boot scripts have been provided for
288<application>Samba</application>. There are two included in the
289<xref linkend="intro-important-bootscripts"/> package. The first,
290<filename>samba</filename>, will start the <command>smbd</command> and
291<command>nmbd</command> daemons needed to provide
292<acronym>SMB</acronym>/<acronym>CIFS</acronym> services. The second
293script, <filename>winbind</filename>, starts the <command>winbindd</command>
294daemon, used for providing Windows domain services to Linux clients.</para>
295
296<para>Install the <filename>samba</filename> script with the following
297command:</para>
298
299<screen><userinput><command>make install-samba</command></userinput></screen>
300
301<para>If you also need the <filename>winbind</filename> script:</para>
302
303<screen><userinput><command>make install-winbind</command></userinput></screen>
304</sect3>
305
306</sect2>
307
308<sect2>
309<title>Contents</title>
310
311<para>The <application>Samba</application> package contains
312<command>findsmb</command>,
313<command>mount.smbfs</command>,
314<command>net</command>,
315<command>nmbd</command>,
316<command>nmblookup</command>,
317<command>ntlm_auth</command>,
318<command>pdbedit</command>,
319<command>profiles</command>,
320<command>rpcclient</command>,
321<command>smbcacls</command>,
322<command>smbclient</command>,
323<command>smbcontrol</command>,
324<command>smbcquotas</command>,
325<command>smbd</command>,
326<command>smbmnt</command>,
327<command>smbmount</command>,
328<command>smbpasswd</command>,
329<command>smbspool</command>,
330<command>smbstatus</command>,
331<command>smbtar</command>,
332<command>smbtree</command>,
333<command>smbumount</command>,
334<command>swat</command>,
335<command>tdbbackup</command>,
336<command>tdbdump</command>,
337<command>tdbtool</command>,
338<command>testparm</command>,
339<command>testprns</command>,
340<command>wbinfo</command> and
341<command>winbindd</command>.</para>
342
343</sect2>
344
345<sect2>
346<title>Description</title>
347<sect3><title>findsmb</title>
348<para><command>findsmb</command> lists information about machines that respond
349to <acronym>SMB</acronym> name queries on a subnet.</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>tdbtool</title>
436<para><command>tdbtool</command> is a tool which allows simple database
437manipulation on the commandline.</para></sect3>
438<sect3><title>testparm</title>
439<para><command>testparm</command> checks an <filename>smb.conf</filename> file
440for proper syntax.</para></sect3>
441<sect3><title>testprns</title>
442<para><command>testprns</command> tests printer names.</para></sect3>
443<sect3><title>wbinfo</title>
444<para><command>wbinfo</command> queries a running <command>winbindd</command>
445daemon.</para></sect3>
446<sect3><title>winbindd</title>
447<para><command>winbindd</command> resolves names from NT servers.</para></sect3>
448
449</sect2>
450
451</sect1>
452
Note: See TracBrowser for help on using the repository browser.