1 | <sect2>
|
---|
2 | <title>Configuring <application>Samba</application></title>
|
---|
3 |
|
---|
4 | <para>Because of the various uses for <application>Samba</application>,
|
---|
5 | complete configuration is well beyond the scope of the BLFS book.
|
---|
6 | In fact, many complete books have been written on this topic alone.
|
---|
7 | The included documentation, a popular book published by O'Reilly,
|
---|
8 | can be viewed by pointing your web browser to
|
---|
9 | <ulink url="file:///usr/share/samba/swat/using_samba/toc.html" />.
|
---|
10 | </para>
|
---|
11 |
|
---|
12 | <para>The built in <acronym>SWAT</acronym> (Samba Web Administration Tool)
|
---|
13 | utility can be used for basic configuration, however, before
|
---|
14 | using <acronym>SWAT</acronym> you must add an entry to
|
---|
15 | <filename>/etc/services</filename> and make changes to your
|
---|
16 | <command>inetd</command>/<command>xinetd</command>
|
---|
17 | configuration.</para>
|
---|
18 |
|
---|
19 | <para>Add the swat entry to <filename>/etc/services</filename> with the
|
---|
20 | following command: </para>
|
---|
21 |
|
---|
22 | <screen><userinput><command>echo "swat 901/tcp" >> /etc/services</command></userinput></screen>
|
---|
23 |
|
---|
24 | <para>If <command>inetd</command> is used, the following command will add the
|
---|
25 | swat entry to <filename>/etc/inetd.conf</filename>: </para>
|
---|
26 |
|
---|
27 | <screen><userinput><command>echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" \
|
---|
28 | >> /etc/inetd.conf</command></userinput></screen>
|
---|
29 | <para>Issue a <command>killall -HUP inetd</command> to reread the
|
---|
30 | changed <filename>inetd.conf</filename> file.</para>
|
---|
31 |
|
---|
32 | <para>If <command>xinetd</command> is used, the following command will
|
---|
33 | add the swat entry to <filename>/etc/xinetd.conf</filename>: </para>
|
---|
34 |
|
---|
35 | <screen><userinput><command>cat >> /etc/xinetd.conf << "EOF"</command>
|
---|
36 | service swat
|
---|
37 | {
|
---|
38 | port = 901
|
---|
39 | socket_type = stream
|
---|
40 | wait = no
|
---|
41 | only_from = 127.0.0.1
|
---|
42 | user = root
|
---|
43 | server = /usr/sbin/swat
|
---|
44 | log_on_failure += USERID
|
---|
45 | }
|
---|
46 | <command>EOF</command></userinput></screen>
|
---|
47 |
|
---|
48 | <para>Issue a <command>killall -HUP xinetd</command> to reread the
|
---|
49 | changed <filename>xinetd.conf</filename> file.</para>
|
---|
50 |
|
---|
51 | <para><acronym>SWAT</acronym> can be launched by pointing your web
|
---|
52 | browser to <ulink url="http://localhost:901"/>.</para>
|
---|
53 |
|
---|
54 | <para>For your convenience, boot scripts have been provided for
|
---|
55 | <application>Samba</application>. There are two included in the
|
---|
56 | <xref linkend="intro-important-bootscripts"/> package. The first,
|
---|
57 | <filename>samba</filename>, will start the <command>smbd</command> and
|
---|
58 | <command>nmbd</command> daemons needed to provide
|
---|
59 | <acronym>SMB</acronym>/<acronym>CIFS</acronym> services. The second
|
---|
60 | script, <filename>winbind</filename>, starts the <command>winbindd</command>
|
---|
61 | daemon, used for providing Windows domain services to Linux clients.</para>
|
---|
62 |
|
---|
63 | <para>Install the <filename>samba</filename> script with the following
|
---|
64 | command:</para>
|
---|
65 |
|
---|
66 | <screen><userinput><command>make install-samba</command></userinput></screen>
|
---|
67 |
|
---|
68 | <para>If you also need the <filename>winbind</filename> script:</para>
|
---|
69 |
|
---|
70 | <screen><userinput><command>make install-winbind</command></userinput></screen>
|
---|
71 |
|
---|
72 | </sect2>
|
---|
73 |
|
---|