2004-05-12 22:00:45 +08:00
|
|
|
<sect2>
|
|
|
|
<title>Configuring <application>Samba</application></title>
|
2004-05-17 16:59:51 +08:00
|
|
|
|
|
|
|
<para>Because of the various uses for <application>Samba</application>,
|
|
|
|
complete configuration is well beyond the scope of the BLFS book.
|
|
|
|
In fact, many complete books have been written on this topic alone.
|
|
|
|
The included documentation, a popular book published by O'Reilly,
|
|
|
|
can be viewed by pointing your web browser to
|
|
|
|
<ulink url="file:///usr/share/samba/swat/using_samba/toc.html" />.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>The built in <acronym>SWAT</acronym> (Samba Web Administration Tool)
|
|
|
|
utility can be used for basic configuration, however, before
|
|
|
|
using <acronym>SWAT</acronym> you must add an entry to
|
|
|
|
<filename>/etc/services</filename> and make changes to your
|
|
|
|
<command>inetd</command>/<command>xinetd</command>
|
|
|
|
configuration.</para>
|
|
|
|
|
|
|
|
<para>Add the swat entry to <filename>/etc/services</filename> with the
|
2004-05-12 22:00:45 +08:00
|
|
|
following command: </para>
|
|
|
|
|
|
|
|
<screen><userinput><command>echo "swat 901/tcp" >> /etc/services</command></userinput></screen>
|
|
|
|
|
|
|
|
<para>If <command>inetd</command> is used, the following command will add the
|
|
|
|
swat entry to <filename>/etc/inetd.conf</filename>: </para>
|
2004-05-17 16:59:51 +08:00
|
|
|
|
2004-05-12 22:00:45 +08:00
|
|
|
<screen><userinput><command>echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" \
|
|
|
|
>> /etc/inetd.conf</command></userinput></screen>
|
2004-06-03 10:41:04 +08:00
|
|
|
<para>Issue a <command>killall -HUP inetd</command> to reread the
|
|
|
|
changed <filename>inetd.conf</filename> file.</para>
|
2004-05-12 22:00:45 +08:00
|
|
|
|
2004-05-17 16:59:51 +08:00
|
|
|
<para>If <command>xinetd</command> is used, the following command will
|
|
|
|
add the swat entry to <filename>/etc/xinetd.conf</filename>: </para>
|
|
|
|
|
2004-05-12 22:00:45 +08:00
|
|
|
<screen><userinput><command>cat >> /etc/xinetd.conf << "EOF"</command>
|
|
|
|
service swat
|
|
|
|
{
|
|
|
|
port = 901
|
|
|
|
socket_type = stream
|
|
|
|
wait = no
|
|
|
|
only_from = 127.0.0.1
|
|
|
|
user = root
|
|
|
|
server = /usr/sbin/swat
|
|
|
|
log_on_failure += USERID
|
|
|
|
}
|
|
|
|
<command>EOF</command></userinput></screen>
|
|
|
|
|
2004-06-03 10:41:04 +08:00
|
|
|
<para>Issue a <command>killall -HUP xinetd</command> to reread the
|
|
|
|
changed <filename>xinetd.conf</filename> file.</para>
|
|
|
|
|
2004-05-12 22:00:45 +08:00
|
|
|
<para><acronym>SWAT</acronym> can be launched by pointing your web
|
2004-05-17 16:59:51 +08:00
|
|
|
browser to <ulink url="http://localhost:901"/>.</para>
|
2004-05-12 22:00:45 +08:00
|
|
|
|
|
|
|
<para>For your convenience, boot scripts have been provided for
|
|
|
|
<application>Samba</application>. There are two included in the
|
2004-05-13 14:40:06 +08:00
|
|
|
<xref linkend="intro-important-bootscripts"/> package. The first,
|
2004-05-12 22:00:45 +08:00
|
|
|
<filename>samba</filename>, will start the <command>smbd</command> and
|
|
|
|
<command>nmbd</command> daemons needed to provide
|
|
|
|
<acronym>SMB</acronym>/<acronym>CIFS</acronym> services. The second
|
|
|
|
script, <filename>winbind</filename>, starts the <command>winbindd</command>
|
|
|
|
daemon, used for providing Windows domain services to Linux clients.</para>
|
|
|
|
|
|
|
|
<para>Install the <filename>samba</filename> script with the following
|
|
|
|
command:</para>
|
2004-05-17 16:59:51 +08:00
|
|
|
|
2004-05-17 00:44:50 +08:00
|
|
|
<screen><userinput><command>make install-samba</command></userinput></screen>
|
2004-05-12 22:00:45 +08:00
|
|
|
|
|
|
|
<para>If you also need the <filename>winbind</filename> script:</para>
|
2004-05-17 16:59:51 +08:00
|
|
|
|
2004-05-17 00:44:50 +08:00
|
|
|
<screen><userinput><command>make install-winbind</command></userinput></screen>
|
2004-05-17 16:59:51 +08:00
|
|
|
|
2004-05-12 22:00:45 +08:00
|
|
|
</sect2>
|
|
|
|
|