Initial import
[samba] / docs / htmldocs / Samba3-HOWTO / install.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 1. How to Install and Test SAMBA</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="introduction.html" title="Part I. General Installation"><link rel="prev" href="introduction.html" title="Part I. General Installation"><link rel="next" href="FastStart.html" title="Chapter 2. Fast Start: Cure for Impatience"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. How to Install and Test SAMBA</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="introduction.html">Prev</a> </td><th width="60%" align="center">Part I. General Installation</th><td width="20%" align="right"> <a accesskey="n" href="FastStart.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="install"></a>Chapter 1. How to Install and Test SAMBA</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a href="mailto:tridge@samba.org">tridge@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Karl</span> <span class="surname">Auer</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a href="mailto:kauer@biplane.com.au">kauer@biplane.com.au</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Dan</span> <span class="surname">Shearer</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a href="mailto:dan@samba.org">dan@samba.org</a>&gt;</code></p></div></div></div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="install.html#id2518844">Obtaining and Installing Samba</a></span></dt><dt><span class="sect1"><a href="install.html#id2518889">Configuring Samba (smb.conf)</a></span></dt><dd><dl><dt><span class="sect2"><a href="install.html#id2518934">Configuration File Syntax</a></span></dt><dt><span class="sect2"><a href="install.html#tdbdocs">TDB Database File Information</a></span></dt><dt><span class="sect2"><a href="install.html#id2519905">Starting Samba</a></span></dt><dt><span class="sect2"><a href="install.html#id2520098">Example Configuration</a></span></dt><dt><span class="sect2"><a href="install.html#id2520545">SWAT</a></span></dt></dl></dd><dt><span class="sect1"><a href="install.html#id2520606">List Shares Available on the Server</a></span></dt><dt><span class="sect1"><a href="install.html#id2520661">Connect with a UNIX Client</a></span></dt><dt><span class="sect1"><a href="install.html#id2520762">Connect from a Remote SMB Client</a></span></dt><dd><dl><dt><span class="sect2"><a href="install.html#id2520848">What If Things Don't Work?</a></span></dt><dt><span class="sect2"><a href="install.html#id2520893">Still Stuck?</a></span></dt></dl></dd><dt><span class="sect1"><a href="install.html#id2520927">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="install.html#id2520937">Large Number of smbd Processes</a></span></dt><dt><span class="sect2"><a href="install.html#id2521032">Error Message: open_oplock_ipc</a></span></dt><dt><span class="sect2"><a href="install.html#id2521066">&#8220;<span class="quote"><span class="errorname">The network name cannot be found</span></span>&#8221;</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2518844"></a>Obtaining and Installing Samba</h2></div></div></div><p>
2         <a class="indexterm" name="id2518852"></a>
3         Binary packages of Samba are included in almost any Linux or UNIX distribution. There are also some
4         packages available at <a href="http://samba.org/" target="_top">the Samba home page</a>. Refer to the manual of your
5         operating system for details on installing packages for your specific operating system.
6         </p><p>
7         <a class="indexterm" name="id2518872"></a>
8         If you need to compile Samba from source, check <a href="compiling.html" title="Chapter 40. How to Compile Samba">How to Compile Samba</a>.
9         </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2518889"></a>Configuring Samba (smb.conf)</h2></div></div></div><p>
10         <a class="indexterm" name="id2518897"></a>
11         <a class="indexterm" name="id2518903"></a>
12         Samba's configuration is stored in the <code class="filename">smb.conf</code> file, which usually resides in
13         <code class="filename">/etc/samba/smb.conf</code> or <code class="filename">/usr/local/samba/lib/smb.conf</code>. You can either
14         edit this file yourself or do it using one of the many graphical tools that are available, such as the
15         Web-based interface SWAT, that is included with Samba.
16         </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2518934"></a>Configuration File Syntax</h3></div></div></div><p>
17         <a class="indexterm" name="id2518942"></a>
18         The <code class="filename">smb.conf</code> file uses the same syntax as the various old <code class="filename">.ini</code> files in Windows
19         3.1: Each file consists of various sections, which are started by putting the section name between brackets
20         (<code class="literal">[]</code>) on a new line. Each contains zero or more key/value pairs separated by an equality
21         sign (<code class="literal">=</code>). The file is just a plaintext file, so you can open and edit it with your favorite
22         editing tool.
23         </p><p>
24         <a class="indexterm" name="id2518981"></a>
25         <a class="indexterm" name="id2518988"></a>
26         <a class="indexterm" name="id2518998"></a>
27         <a class="indexterm" name="id2519004"></a>
28         <a class="indexterm" name="id2519011"></a>
29         <a class="indexterm" name="id2519020"></a>
30         Each section in the <code class="filename">smb.conf</code> file represents either a share or a meta-service on the Samba server. The
31         section <code class="literal">[global]</code> is special, since it contains settings that apply to the whole Samba
32         server.  Samba supports a number of meta-services, each of which serves its own purpose. For example, the
33         <code class="literal">[homes]</code> share is a meta-service that causes Samba to provide a personal home share for
34         each user. The <code class="literal">[printers]</code> share is a meta-service that establishes print queue support
35         and that specifies the location of the intermediate spool directory into which print jobs are received
36         from Windows clients prior to being dispatched to the UNIX/Linux print spooler.
37         </p><p>
38 <a class="indexterm" name="id2519067"></a>
39 <a class="indexterm" name="id2519074"></a>
40 <a class="indexterm" name="id2519081"></a>
41 <a class="indexterm" name="id2519087"></a>
42 <a class="indexterm" name="id2519094"></a>
43 <a class="indexterm" name="id2519101"></a>
44         The <code class="literal">printers</code> meta-service will cause every printer that is either specified in a
45         <code class="literal">printcap</code> file, via the <span><strong class="command">lpstat</strong></span>,  or via the CUPS API, to be
46         published as a shared print queue. The <code class="literal">printers</code> stanza in the <code class="filename">smb.conf</code> file can
47         be set as not browseable. If it is set to be browseable, then it will be visible as if it is a share.
48         That makes no sense given that this meta-service is responsible only for making UNIX system printers
49         available as Windows print queues. If a <code class="literal">comment</code> parameter is specified, the value
50         of it will be displayed as part of the printer name in Windows Explorer browse lists.
51         </p><p>
52         <a class="indexterm" name="id2519156"></a>
53         Each section of the <code class="filename">smb.conf</code> file that specifies a share, or a meta-service, is called a stanza.
54         The <code class="literal">global</code> stanza specifies settings that affect all the other stanzas in the
55         <code class="filename">smb.conf</code> file. Configuration parameters are documented in the <code class="filename">smb.conf</code> man page. Some parameters
56         can be used only in the <code class="literal">global</code> stanza, some only in share or meta-service stanzas,
57         and some can be used globally or just within a share or meta-service stanza.
58         </p><p>
59         <a class="indexterm" name="id2519202"></a>
60         <a href="install.html#smbconfminimal" title="Example 1.1. A minimal smb.conf">A minimal smb.conf</a> contains a very minimal <code class="filename">smb.conf</code>.
61         <a class="indexterm" name="id2519226"></a>
62         </p><div class="example"><a name="smbconfminimal"></a><p class="title"><b>Example 1.1. A minimal smb.conf</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2519257"></a><em class="parameter"><code>workgroup = WKG</code></em></td></tr><tr><td><a class="indexterm" name="id2519270"></a><em class="parameter"><code>netbios name = MYNAME</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[share1]</code></em></td></tr><tr><td><a class="indexterm" name="id2519292"></a><em class="parameter"><code>path = /tmp</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[share2]</code></em></td></tr><tr><td><a class="indexterm" name="id2519314"></a><em class="parameter"><code>path = /my_shared_folder</code></em></td></tr><tr><td><a class="indexterm" name="id2519327"></a><em class="parameter"><code>comment = Some random files</code></em></td></tr></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="tdbdocs"></a>TDB Database File Information</h3></div></div></div><p>
63         This section contains brief descriptions of the databases that are used by Samba-3.
64         </p><p>
65 <a class="indexterm" name="id2519358"></a>
66         The directory in which Samba stores the tdb files is determined by compile-time directives. Samba-3 stores
67         tdb files in two locations. The best way to determine these locations is to execute the following
68         command:
69 </p><pre class="screen">
70 <code class="prompt">root# </code> smbd -b | grep PRIVATE_DIR
71    PRIVATE_DIR: /etc/samba/private
72 </pre><p>
73         This means that the confidential tdb files are stored in the <code class="filename">/etc/samba/private</code>
74         directory. Samba-3 also uses a number of tdb files that contain more mundane data. The location of
75         these files can be found by executing:
76 </p><pre class="screen">
77 <code class="prompt">root# </code> smbd -b | grep LOCKDIR
78    LOCKDIR: /var/lib/samba
79 </pre><p>
80         Therefore the remaining control files will, in the example shown, be stored in the
81         <code class="filename">/var/lib/samba</code> directory.
82         </p><p>
83 <a class="indexterm" name="id2519414"></a>
84         The persistent tdb files are described in <a href="install.html#tdbpermfiledesc" title="Table 1.1. Persistent TDB File Descriptions">the Persistent TDB File
85         Descriptions table</a>. All persistent tdb files should be regularly backed up. Use the
86         <span><strong class="command">tdbbackup</strong></span> utility to backup the tdb files. All persistent tdb files must be
87         preserved during machine migrations, updates and upgrades.
88         </p><p>
89         The temporary tdb files do not need to be backed up, nor do they need to be preseved across machine
90         migrations, updates or upgrades. The temporary tdb files are described in <a href="install.html#tdbtempfiledesc" title="Table 1.2. Temporary TDB File Descriptions">
91         the Temporary TDB File Descriptions</a>.
92         </p><div class="table"><a name="tdbpermfiledesc"></a><p class="title"><b>Table 1.1. Persistent TDB File Descriptions</b></p><table summary="Persistent TDB File Descriptions" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="left">Name</th><th align="justify">Description</th></tr></thead><tbody><tr><td align="left">account_policy</td><td align="justify"><p>Samba/NT account policy settings, includes password expiration settings.</p></td></tr><tr><td align="left">group_mapping</td><td align="justify"><p>Mapping table from Windows groups/SID to UNIX groups.</p></td></tr><tr><td align="left">ntdrivers</td><td align="justify"><p>Stores per-printer installed driver information.</p></td></tr><tr><td align="left">ntforms</td><td align="justify"><p>Stores per-printer installed forms information.</p></td></tr><tr><td align="left">ntprinters</td><td align="justify"><p>Stores the per-printer devmode configuration settings.</p></td></tr><tr><td align="left">passdb</td><td align="justify"><p>
93                                 Exists only when the tdbsam passwd backend is used. This file stores the
94                                 SambaSAMAccount information. Note: This file requires that user POSIX account information is
95                                 availble from either the /etc/passwd file, or from an alternative system source.
96                         </p></td></tr><tr><td align="left">registry</td><td align="justify"><p>
97                                 Read-only Samba database of a Windows registry skeleton that provides support for exporting 
98                                 various database tables via the winreg RPCs.
99                         </p></td></tr><tr><td align="left">secrets</td><td align="justify"><p>
100                                 This file stores the Workgroup/Domain/Machine SID, the LDAP directory update password, and
101                                 a further collection of critical environmental data that is necessary for Samba to operate
102                                 correctly. This file contains very sensitive information that must be protected. It is stored
103                                 in the PRIVARE_DIR directory.
104                         </p></td></tr><tr><td align="left">share_info</td><td align="justify"><p>Stores per-share ACL information.</p></td></tr><tr><td align="left">winbindd_idmap</td><td align="justify"><p>Winbindd's local IDMAP database.</p></td></tr></tbody></table></div><div class="table"><a name="tdbtempfiledesc"></a><p class="title"><b>Table 1.2. Temporary TDB File Descriptions</b></p><table summary="Temporary TDB File Descriptions" border="1"><colgroup><col align="left"><col align="justify"><col align="left"></colgroup><thead><tr><th align="left">Name</th><th align="justify">Description</th><th align="center">Backup</th></tr></thead><tbody><tr><td align="left">brlock</td><td align="justify"><p>Byte-range locking information.</p></td><td align="left">No</td></tr><tr><td align="left">connections</td><td align="justify"><p>A temporary cache for current connection information used to enforce max connections.</p></td><td align="left">no</td></tr><tr><td align="left">eventlog/*tdb</td><td align="justify"><p>Records of eventlog entries. In most circumstances this is just a cache of system logs.</p></td><td align="left">no</td></tr><tr><td align="left">gencache</td><td align="justify"><p>Generic caching database for dead WINS servers and trusted domain data.</p></td><td align="left">no</td></tr><tr><td align="left">login_cache</td><td align="justify"><p>A temporary cache for login information, in particular bad password attempts.</p></td><td align="left">no</td></tr><tr><td align="left">messages</td><td align="justify"><p>Temporary storage of messages being processed by smbd.</p></td><td align="left">no</td></tr><tr><td align="left">netsamlogon_cache</td><td align="justify"><p>Caches user net_info_3 structure data from net_samlogon requests (as a domain member).</p></td><td align="left">no</td></tr><tr><td align="left">perfmon/*.tdb</td><td align="justify"><p>Performance counter information.</p></td><td align="left">no</td></tr><tr><td align="left">printing/*.tdb</td><td align="justify"><p>Cached output from lpq command created on a per-print-service basis.</p></td><td align="left">no</td></tr><tr><td align="left">schannel_store</td><td align="justify"><p>
105                                 A confidential file, stored in the PRIVATE_DIR, containing crytographic connection
106                                 information so that clients that have temporarily disconnected can reconnect without
107                                 needing to renegotiate the connection setup process.
108                         </p></td><td align="left">no</td></tr><tr><td align="left">sessionid</td><td align="justify"><p>Temporary cache for miscellaneous session information and for utmp handling.</p></td><td align="left">no</td></tr><tr><td align="left">unexpected</td><td align="justify"><p>Stores packets received for which no process is actively listening.</p></td><td align="left">no</td></tr><tr><td align="left">winbindd_cache</td><td align="justify"><p>Cache of Identity information received from an NT4 domain or from ADS. Includes user
109                                 lists, etc.</p></td><td align="left">yes</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2519905"></a>Starting Samba</h3></div></div></div><p>
110         <a class="indexterm" name="id2519912"></a>
111         Samba essentially consists of two or three daemons. A daemon is a UNIX application that runs in the background and provides services.
112         An example of a service is the Apache Web server for which the daemon is called <span><strong class="command">httpd</strong></span>. In the case of Samba there
113         are three daemons, two of which are needed as a minimum.
114         </p><p>
115         The Samba server is made up of the following daemons:
116         </p><div class="variablelist"><dl><dt><span class="term">nmbd</span></dt><dd><p>
117                         <a class="indexterm" name="id2519945"></a>
118                         <a class="indexterm" name="id2519952"></a>
119                         This daemon handles all name registration and resolution requests. It is the primary vehicle involved
120                         in network browsing. It handles all UDP-based protocols. The <span><strong class="command">nmbd</strong></span> daemon should
121                         be the first command started as part of the Samba startup process.
122                         </p></dd><dt><span class="term">smbd</span></dt><dd><p>
123                         <a class="indexterm" name="id2519981"></a>
124                         <a class="indexterm" name="id2519988"></a>
125                         This daemon handles all TCP/IP-based connection services for file- and print-based operations. It also
126                         manages local authentication. It should be started immediately following the startup of <span><strong class="command">nmbd</strong></span>.
127                         </p></dd><dt><span class="term">winbindd</span></dt><dd><p>
128                         <a class="indexterm" name="id2520017"></a>
129                         <a class="indexterm" name="id2520024"></a>
130                         This daemon should be started when Samba is a member of a Windows NT4 or ADS domain. It is also needed when
131                         Samba has trust relationships with another domain. The <span><strong class="command">winbindd</strong></span> daemon will check the
132                         <code class="filename">smb.conf</code> file for the presence of the <em class="parameter"><code>idmap uid</code></em> and <em class="parameter"><code>idmap gid</code></em>
133                         parameters. If they are are found, <span><strong class="command">winbindd</strong></span> will use the values specified for
134                         for UID and GID allocation. If these parameters are not specified, <span><strong class="command">winbindd</strong></span>
135                         will start but it will not be able to allocate UIDs or GIDs.
136                         </p></dd></dl></div><p>
137         <a class="indexterm" name="id2520081"></a>
138         When Samba has been packaged by an operating system vendor, the startup process is typically a custom feature of its
139         integration into the platform as a whole. Please refer to your operating system platform administration manuals for
140         specific information pertaining to correct management of Samba startup.
141         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2520098"></a>Example Configuration</h3></div></div></div><p>
142         <a class="indexterm" name="id2520106"></a>
143         <a class="indexterm" name="id2520113"></a>
144         <a class="indexterm" name="id2520120"></a>
145         <a class="indexterm" name="id2520127"></a>
146         <a class="indexterm" name="id2520134"></a>
147         There are sample configuration files in the examples subdirectory in the source code distribution tarball
148         package. It is suggested you read them carefully so you can see how the options go together in practice. See
149         the man page for all the options.  It might be worthwhile to start out with the
150         <code class="filename">smb.conf.default</code> configuration file and adapt it to your needs. It contains plenty of comments.
151         </p><p>
152         <a class="indexterm" name="id2520156"></a>
153         The simplest useful configuration file would contain something like that shown in
154         <a href="install.html#simple-example" title="Example 1.2. Another simple smb.conf File">Another simple smb.conf File</a>.
155         <a class="indexterm" name="id2520176"></a>
156         </p><div class="example"><a name="simple-example"></a><p class="title"><b>Example 1.2. Another simple smb.conf File</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2520208"></a><em class="parameter"><code>workgroup = MIDEARTH</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[homes]</code></em></td></tr><tr><td><a class="indexterm" name="id2520230"></a><em class="parameter"><code>guest ok = no</code></em></td></tr><tr><td><a class="indexterm" name="id2520242"></a><em class="parameter"><code>read only = no</code></em></td></tr></table></div><p>
157         <a class="indexterm" name="id2520258"></a>
158         <a class="indexterm" name="id2520265"></a>
159         <a class="indexterm" name="id2520272"></a>
160         <a class="indexterm" name="id2520278"></a>
161         This will allow connections by anyone with an account on the server, using either
162         their login name or <em class="parameter"><code>homes</code></em> as the service name.
163         (Note: The workgroup that Samba should appear in must also be set. The default
164         workgroup name is WORKGROUP.)
165         </p><p>
166         <a class="indexterm" name="id2520298"></a>
167         Make sure you put the <code class="filename">smb.conf</code> file in the correct place. Note, the correct location of this file
168         depends on how the binary files were built. You can discover the correct location by executing from
169         the directory that contains the <span><strong class="command">smbd</strong></span> command file:
170 </p><pre class="screen">
171 <code class="prompt">root# </code> smbd -b | grep smb.conf
172 </pre><p>
173         </p><p>
174         <a class="indexterm" name="id2520336"></a>
175         For more information about security settings for the <em class="parameter"><code>[homes]</code></em> share, please refer to 
176         <a href="securing-samba.html" title="Chapter 17. Securing Samba">Securing Samba</a>.
177         </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2520361"></a>Test Your Config File with <span><strong class="command">testparm</strong></span></h4></div></div></div><p>
178         <a class="indexterm" name="id2520374"></a>
179         <a class="indexterm" name="id2520380"></a>
180         <a class="indexterm" name="id2520387"></a>
181         It's important to validate the contents of the <code class="filename">smb.conf</code> file using the <span class="application">testparm</span> program.
182         If testparm runs correctly, it will list the loaded services. If not, it will give an error message.
183         Make sure it runs correctly and that the services look reasonable before proceeding. Enter the command: 
184         </p><pre class="screen">
185         <code class="prompt">root# </code> testparm /etc/samba/smb.conf
186         </pre><p>
187         Testparm will parse your configuration file and report any unknown parameters or incorrect syntax.
188         It also performs a check for common misconfigurations and will issue a warning if one is found.
189         </p><p>
190         Always run testparm again whenever the <code class="filename">smb.conf</code> file is changed!
191         </p><p>
192         <a class="indexterm" name="id2520439"></a>
193         <a class="indexterm" name="id2520446"></a>
194         <a class="indexterm" name="id2520453"></a>
195         <a class="indexterm" name="id2520460"></a>
196         The <code class="filename">smb.conf</code> file is constantly checked by the Samba daemons <span><strong class="command">smbd</strong></span> and every instance of
197         itself that it spawns, <span><strong class="command">nmbd</strong></span> and <span><strong class="command">winbindd</strong></span>. It is good practice to
198         keep this file as small as possible. Many administrators prefer to document Samba configuration settings
199         and thus the need to keep this file small goes against good documentation wisdom. One solution that may
200         be adopted is to do all documentation and configuration in a file that has another name, such as
201         <code class="filename">smb.conf.master</code>. The <span><strong class="command">testparm</strong></span> utility can be used to generate a
202         fully optimized <code class="filename">smb.conf</code> file from this master configuration and documtenation file as shown here:
203 </p><pre class="screen">
204 <code class="prompt">root# </code> testparm -s smb.conf.master &gt; smb.conf
205 </pre><p>
206         This administrative method makes it possible to maintain detailed configuration change records while at
207         the same time keeping the working <code class="filename">smb.conf</code> file size to the minimum necessary.
208         </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2520545"></a>SWAT</h3></div></div></div><p>
209         <a class="indexterm" name="id2520553"></a>
210         SWAT is a Web-based interface that can be used to facilitate the configuration of Samba.  SWAT might not
211         be available in the Samba package that shipped with your platform, but in a separate package. If it is
212         necesaary to built SWAT please read the SWAT man page regarding compilation, installation, and
213         configuration of SWAT from the source code.
214         </p><p>
215         To launch SWAT, just run your favorite Web browser and point it to
216         <a href="http://localhost:901/" target="_top">http://localhost:901/</a>.
217         Replace <em class="replaceable"><code>localhost</code></em> with the name of the computer on which
218         Samba is running if that is a different computer than your browser.
219         </p><p>
220         SWAT can be used from a browser on any IP-connected machine, but be aware that connecting from a remote
221         machine leaves your connection open to password sniffing because passwords will be sent over the wire in the clear. 
222         </p><p>
223         More information about SWAT can be found in <a href="SWAT.html" title="Chapter 36. SWAT: The Samba Web Administration Tool">The Samba Web Administration Tool</a>.
224         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2520606"></a>List Shares Available on the Server</h2></div></div></div><p>
225         To list shares that are available from the configured Samba server, execute the
226         following command:
227         </p><pre class="screen">
228 <code class="prompt">$ </code><strong class="userinput"><code>smbclient -L <em class="replaceable"><code>yourhostname</code></em></code></strong>
229 </pre><p>
230         You should see a list of shares available on your server. If you do not, then
231         something is incorrectly configured. This method can also be used to see what shares 
232         are available on other SMB servers, such as Windows 2000.
233         </p><p>
234         If you choose user-level security, you may find that Samba requests a password
235         before it will list the shares. See the <span><strong class="command">smbclient</strong></span> man page for details.
236         You can force it to list the shares without a password by adding the option
237         <code class="option">-N</code> to the command line. 
238         </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2520661"></a>Connect with a UNIX Client</h2></div></div></div><p>
239         Enter the following command:
240 </p><pre class="screen">
241 <code class="prompt">$ </code><strong class="userinput"><code>smbclient <em class="replaceable"><code> //yourhostname/aservice</code></em></code></strong>
242 </pre><p>Typically <em class="replaceable"><code>yourhostname</code></em> is the name of the host on which <span class="application">smbd</span>
243         has been installed. The <em class="replaceable"><code>aservice</code></em> is any service that has been defined in the <code class="filename">smb.conf</code>
244         file. Try your username if you just have a <em class="parameter"><code>[homes]</code></em> section in the <code class="filename">smb.conf</code> file.</p><p>Example: If the UNIX host is called <em class="replaceable"><code>bambi</code></em> and a valid login name
245         is <em class="replaceable"><code>fred</code></em>, you would type:</p><pre class="screen">
246 <code class="prompt">$ </code><strong class="userinput"><code>smbclient //<em class="replaceable"><code>bambi</code></em>/<em class="replaceable"><code>fred</code></em></code></strong>
247 </pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2520762"></a>Connect from a Remote SMB Client</h2></div></div></div><p>
248         Now that Samba is working correctly locally, you can try to access it from other clients. Within a few
249         minutes, the Samba host should be listed in the Network Neighborhood on all Windows clients of its subnet.
250         Try browsing the server from another client or "mounting" it.
251         </p><p>
252         Mounting disks from a DOS, Windows, or OS/2 client can be done by running a command such as:
253 </p><pre class="screen">
254 <code class="prompt">C:\&gt; </code><strong class="userinput"><code>net use m: \\servername\service</code></strong>
255 </pre><p>
256         Where the drive letter m: is any available drive letter. It is important to double-check that the
257         service (share) name that you used does actually exist.
258         </p><p>
259         Try printing, for example,
260 </p><pre class="screen">
261 <code class="prompt">C:\&gt; </code><strong class="userinput"><code>net use lpt1:       \\servername\spoolservice</code></strong>
262 </pre><p>
263         The <code class="literal">spoolservice</code> is the name of the printer (actually the print queue) on the target
264         server. This will permit all print jobs that are captured by the lpt1: port on the Windows client to
265         be sent to the printer that owns the spoolservice that has been specified.
266         </p><p>
267 </p><pre class="screen"><code class="prompt">C:\&gt; </code><strong class="userinput"><code>print filename</code></strong>
268 </pre><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2520848"></a>What If Things Don't Work?</h3></div></div></div><p>
269         You might want to read <a href="diagnosis.html" title="Chapter 37. The Samba Checklist">The Samba Checklist</a>.  If you are still
270         stuck, refer to <a href="problems.html" title="Chapter 38. Analyzing and Solving Samba Problems">Analyzing and Solving Samba Problems</a>.  Samba has
271         been successfully installed at thousands of sites worldwide.  It is unlikely that your particular problem is
272         unique, so it might be productive to perform an Internet search to see if someone else has encountered your
273         problem and has found a way to overcome it.
274         </p><p>
275         If you are new to Samba, and particularly if you are new to Windows networking, or to UNIX/Linux,
276         the book &#8220;<span class="quote">Samba-3 by Example</span>&#8221; will help you to create a validated network environment.
277         Simply choose from the first five chapters the network design that most closely matches site needs,
278         then follow the simple step-by-step procedure to deploy it. Later, when you have a working network
279         you may well want to refer back to this book for further insight into opportunities for improvement.
280         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2520893"></a>Still Stuck?</h3></div></div></div><p>
281         The best advice under the stress of abject frustration is to cool down! That may be challenging
282         of itself, but while you are angry or annoyed your ability to seek out a solution is somewhat
283         undermined. A cool head clears the way to finding the answer you are looking for. Just remember,
284         every problem has a solution  there is a good chance that someone else has found it
285         even though you can't right now. That will change with time, patience and learning.
286         </p><p>
287         Now that you have cooled down a bit, please refer to <a href="diagnosis.html" title="Chapter 37. The Samba Checklist">the Samba Checklist</a>
288         for a process that can be followed to identify the cause of your problem.
289         </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2520927"></a>Common Errors</h2></div></div></div><p>
290 The following questions and issues are raised repeatedly on the Samba mailing list.
291 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2520937"></a>Large Number of smbd Processes</h3></div></div></div><p>
292         Samba consists of three core programs: <span class="application">nmbd</span>, <span class="application">smbd</span>, and <span class="application">winbindd</span>. <span class="application">nmbd</span> is the name server message daemon,
293         <span class="application">smbd</span> is the server message daemon, and <span class="application">winbindd</span> is the daemon that handles communication with domain controllers.
294         </p><p>
295         If Samba is <span class="emphasis"><em>not</em></span> running as a WINS server, then there will be one single instance of
296          <span class="application">nmbd</span> running on your system. If it is running as a WINS server, then there will be
297         two instances  one to handle the WINS requests.
298         </p><p>
299         <span class="application">smbd</span> handles all connection requests. It spawns a new process for each client
300         connection made. That is why you may see so many of them, one per client connection.
301         </p><p>
302         <span class="application">winbindd</span> will run as one or two daemons, depending on whether or not it is being
303         run in <span class="emphasis"><em>split mode</em></span> (in which case there will be two instances).
304         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2521032"></a>Error Message: open_oplock_ipc</h3></div></div></div><p>
305         An error message is observed in the log files when <span class="application">smbd</span> is started: &#8220;<span class="quote">open_oplock_ipc: Failed to
306         get local UDP socket for address 100007f. Error was Cannot assign requested.</span>&#8221;
307         </p><p>
308         Your loopback device isn't working correctly. Make sure it is configured correctly. The loopback
309         device is an internal (virtual) network device with the IP address <span class="emphasis"><em>127.0.0.1</em></span>.
310         Read your OS documentation for details on how to configure the loopback on your system.
311         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2521066"></a>&#8220;<span class="quote"><span class="errorname">The network name cannot be found</span></span>&#8221;</h3></div></div></div><p>
312                 This error can be caused by one of these misconfigurations:
313                 </p><div class="itemizedlist"><ul type="disc"><li><p>You specified a nonexisting path
314                         for the share in <code class="filename">smb.conf</code>.</p></li><li><p>The user you are trying to access the share with does not 
315                         have sufficient permissions to access the path for
316                         the share. Both read (r) and access (x) should be possible.</p></li><li><p>The share you are trying to access does not exist.</p></li></ul></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="introduction.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="introduction.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="FastStart.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part I. General Installation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Fast Start: Cure for Impatience</td></tr></table></div></body></html>