Corrected default settings for "ldap timeout".
[Samba.git] / docs / manpages / smbd.8.xml
blob3b028dfc813ad3d5462c1b05f5e606d9d221a651
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
3                                   
4 <!ENTITY % globalentities SYSTEM '../entities/global.entities'> %globalentities;
5 ]>
6 <refentry id="smbd.8">
8 <refmeta>
9         <refentrytitle>smbd</refentrytitle>
10         <manvolnum>8</manvolnum>
11 </refmeta>
14 <refnamediv>
15         <refname>smbd</refname>
16         <refpurpose>server to provide SMB/CIFS services to clients</refpurpose>
17 </refnamediv>
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>smbd</command>
22                 <arg choice="opt">-D</arg>
23                 <arg choice="opt">-F</arg>
24                 <arg choice="opt">-S</arg>
25                 <arg choice="opt">-i</arg>
26                 <arg choice="opt">-h</arg>
27                 <arg choice="opt">-V</arg>
28                 <arg choice="opt">-b</arg>
29                 <arg choice="opt">-d &lt;debug level&gt;</arg>
30                 <arg choice="opt">-l &lt;log directory&gt;</arg>
31                 <arg choice="opt">-p &lt;port number(s)&gt;</arg>
32                 <arg choice="opt">-O &lt;socket option&gt;</arg>
33                 <arg choice="opt">-s &lt;configuration file&gt;</arg>
34         </cmdsynopsis>
35 </refsynopsisdiv>
37 <refsect1>
38         <title>DESCRIPTION</title>
39         <para>This program is part of the <citerefentry><refentrytitle>samba</refentrytitle>
40         <manvolnum>7</manvolnum></citerefentry> suite.</para>
42         <para><command>smbd</command> is the server daemon that 
43         provides filesharing and printing services to Windows clients. 
44         The server provides filespace and printer services to
45         clients using the SMB (or CIFS) protocol. This is compatible 
46         with the LanManager protocol, and can service LanManager 
47         clients.  These include MSCLIENT 3.0 for DOS, Windows for 
48         Workgroups, Windows 95/98/ME, Windows NT, Windows 2000, 
49         OS/2, DAVE for Macintosh, and smbfs for Linux.</para>
51         <para>An extensive description of the services that the 
52         server can provide is given in the man page for the 
53         configuration file controlling the attributes of those 
54         services (see <citerefentry><refentrytitle>smb.conf</refentrytitle>
55         <manvolnum>5</manvolnum></citerefentry>.  This man page will not describe the 
56         services, but will concentrate on the administrative aspects 
57         of running the server.</para>
59         <para>Please note that there are significant security 
60         implications to running this server, and the <citerefentry><refentrytitle>smb.conf</refentrytitle>
61         <manvolnum>5</manvolnum></citerefentry> manual page should be regarded as mandatory reading before 
62         proceeding with installation.</para>
64         <para>A session is created whenever a client requests one. 
65         Each client gets a copy of the server for each session. This 
66         copy then services all connections made by the client during 
67         that session. When all connections from its client are closed, 
68         the copy of the server for that client terminates.</para>
70         <para>The configuration file, and any files that it includes, 
71         are automatically reloaded every minute, if they change.  You 
72         can force a reload by sending a SIGHUP to the server.  Reloading 
73         the configuration file will not affect connections to any service 
74         that is already established.  Either the user will have to 
75         disconnect from the service, or <command>smbd</command> killed and restarted.</para>
76 </refsect1>
78 <refsect1>
79         <title>OPTIONS</title>
81         <variablelist>
82                 <varlistentry>
83                 <term>-D</term>
84                 <listitem><para>If specified, this parameter causes 
85                 the server to operate as a daemon. That is, it detaches 
86                 itself and runs in the background, fielding requests 
87                 on the appropriate port. Operating the server as a
88                 daemon is the recommended way of running <command>smbd</command> for 
89                 servers that provide more than casual use file and 
90                 print services.  This switch is assumed if <command>smbd
91                 </command> is executed on the command line of a shell.
92                 </para></listitem>
93                 </varlistentry>
95                 <varlistentry>
96                 <term>-F</term>
97                 <listitem><para>If specified, this parameter causes
98                 the main <command>smbd</command> process to not daemonize,
99                 i.e. double-fork and disassociate with the terminal.
100                 Child processes are still created as normal to service
101                 each connection request, but the main process does not
102                 exit. This operation mode is suitable for running
103                 <command>smbd</command> under process supervisors such
104                 as <command>supervise</command> and <command>svscan</command>
105                 from Daniel J. Bernstein's <command>daemontools</command>
106                 package, or the AIX process monitor.
107                 </para></listitem>
108                 </varlistentry>
110                 <varlistentry>
111                 <term>-S</term>
112                 <listitem><para>If specified, this parameter causes
113                 <command>smbd</command> to log to standard output rather
114                 than a file.</para></listitem>
115                 </varlistentry>
117                 <varlistentry>
118                 <term>-i</term>
119                 <listitem><para>If this parameter is specified it causes the
120                 server to run "interactively", not as a daemon, even if the
121                 server is executed on the command line of a shell. Setting this
122                 parameter negates the implicit deamon mode when run from the
123                 command line. <command>smbd</command> also logs to standard
124                 output, as if the <command>-S</command> parameter had been
125                 given.
126                 </para></listitem>
127                 </varlistentry>
128                 
129                 &popt.common.samba;
130                 &stdarg.help;
132                 <varlistentry>
133                 <term>-b</term>
134                 <listitem><para>Prints information about how 
135                 Samba was built.</para></listitem>
136                 </varlistentry>
137                 
138                 <varlistentry>
139                 <term>-p &lt;port number(s)&gt;</term>
140                 <listitem><para><replaceable>port number(s)</replaceable> is a 
141                 space or comma-separated list of TCP ports smbd should listen on.
142                 The default value is taken from the <smbconfoption><name>ports</name></smbconfoption> parameter in &smb.conf;</para>
144                 <para>The default ports are 139 (used for SMB over NetBIOS over TCP)
145                         and port 445 (used for plain SMB over TCP).
146         </para></listitem>
147                 
148                 </varlistentry>
149         </variablelist>
150 </refsect1>
152 <refsect1>
153         <title>FILES</title>
155         <variablelist>
156                 <varlistentry>
157                 <term><filename>/etc/inetd.conf</filename></term>
158                 <listitem><para>If the server is to be run by the 
159                 <command>inetd</command> meta-daemon, this file 
160                 must contain suitable startup information for the 
161                 meta-daemon. 
162                 </para></listitem>
163                 </varlistentry>
164                 
165                 <varlistentry>
166                 <term><filename>/etc/rc</filename></term>
167                 <listitem><para>or whatever initialization script your 
168                 system uses).</para>
170                 <para>If running the server as a daemon at startup, 
171                 this file will need to contain an appropriate startup 
172                 sequence for the server. </para></listitem>
173                 </varlistentry>
174                 
175                 <varlistentry>
176                 <term><filename>/etc/services</filename></term>
177                 <listitem><para>If running the server via the 
178                 meta-daemon <command>inetd</command>, this file 
179                 must contain a mapping of service name (e.g., netbios-ssn) 
180                 to service port (e.g., 139) and protocol type (e.g., tcp). 
181                 </para></listitem>
182                 </varlistentry>
183                 
184                 <varlistentry>
185                 <term><filename>/usr/local/samba/lib/smb.conf</filename></term>
186                 <listitem><para>This is the default location of the <citerefentry><refentrytitle>smb.conf</refentrytitle>
187                 <manvolnum>5</manvolnum></citerefentry> server configuration file. Other common places that systems 
188                 install this file are <filename>/usr/samba/lib/smb.conf</filename> 
189                 and <filename>/etc/samba/smb.conf</filename>.</para>
190                 
191                 <para>This file describes all the services the server 
192                 is to make available to clients. See <citerefentry><refentrytitle>smb.conf</refentrytitle>
193                 <manvolnum>5</manvolnum></citerefentry> for more information.</para>
194                 </listitem>
195                 </varlistentry>
196         </variablelist>
197 </refsect1>
199 <refsect1>
200         <title>LIMITATIONS</title>
201         <para>On some systems <command>smbd</command> cannot change uid back 
202         to root after a setuid() call.  Such systems are called 
203         trapdoor uid systems. If you have such a system, 
204         you will be unable to connect from a client (such as a PC) as 
205         two different users at once. Attempts to connect the
206         second user will result in access denied or 
207         similar.</para>
208 </refsect1>
210 <refsect1>
211         <title>ENVIRONMENT VARIABLES</title>
213         <variablelist>
214                 <varlistentry>
215                 <term><envar>PRINTER</envar></term>
216                 <listitem><para>If no printer name is specified to 
217                 printable services, most systems will use the value of 
218                 this variable (or <constant>lp</constant> if this variable is 
219                 not defined) as the name of the printer to use. This 
220                 is not specific to the server, however.</para></listitem>
221                 </varlistentry>
222         </variablelist>
223 </refsect1>
226 <refsect1>
227         <title>PAM INTERACTION</title>
228         <para>Samba uses PAM for authentication (when presented with a plaintext 
229         password), for account checking (is this account disabled?) and for
230         session management.  The degree too which samba supports PAM is restricted
231         by the limitations of the SMB protocol and the <smbconfoption><name>obey pam restrictions</name></smbconfoption> <citerefentry><refentrytitle>smb.conf</refentrytitle>
232         <manvolnum>5</manvolnum></citerefentry> paramater.  When this is set, the following restrictions apply:
233         </para>
235         <itemizedlist>
236         <listitem><para><emphasis>Account Validation</emphasis>:  All accesses to a 
237         samba server are checked 
238         against PAM to see if the account is vaild, not disabled and is permitted to 
239         login at this time.  This also applies to encrypted logins.
240         </para></listitem>
242         <listitem><para><emphasis>Session Management</emphasis>:  When not using share 
243         level secuirty, users must pass PAM's session checks before access 
244         is granted.  Note however, that this is bypassed in share level secuirty.  
245         Note also that some older pam configuration files may need a line 
246         added for session support. 
247         </para></listitem>
248         </itemizedlist>
249 </refsect1>
251 <refsect1>
252         <title>VERSION</title>
254         <para>This man page is correct for version 3.0 of 
255         the Samba suite.</para>
256 </refsect1>
258 <refsect1>
259         <title>DIAGNOSTICS</title>
261         <para>Most diagnostics issued by the server are logged 
262         in a specified log file. The log file name is specified 
263         at compile time, but may be overridden on the command line.</para>
265         <para>The number and nature of diagnostics available depends 
266         on the debug level used by the server. If you have problems, set 
267         the debug level to 3 and peruse the log files.</para>
269         <para>Most messages are reasonably self-explanatory. Unfortunately, 
270         at the time this man page was created, there are too many diagnostics 
271         available in the source code to warrant describing each and every 
272         diagnostic. At this stage your best bet is still to grep the 
273         source code and inspect the conditions that gave rise to the 
274         diagnostics you are seeing.</para>
275 </refsect1>
277 <refsect1>
278         <title>TDB FILES</title>
280         <para>Samba stores it's data in several TDB (Trivial Database) files, usually located in <filename>/var/lib/samba</filename>.</para>
281         
282         <para>
283         (*) information persistent across restarts (but not
284         necessarily important to backup).
285         </para>
287 <variablelist>
288 <varlistentry><term>account_policy.tdb*</term>
289 <listitem>
290 <para>NT account policy settings such as pw expiration, etc...</para>
291 </listitem>
292 </varlistentry>
294 <varlistentry><term>brlock.tdb</term>
295 <listitem><para>byte range locks</para></listitem>
296 </varlistentry>
298 <varlistentry><term>browse.dat</term>
299 <listitem><para>browse lists</para></listitem>
300 </varlistentry>
302 <varlistentry><term>connections.tdb</term>
303 <listitem><para>share connections (used to enforce max connections, etc...)</para></listitem>
304 </varlistentry>
306 <varlistentry><term>gencache.tdb</term>
307 <listitem><para>generic caching db</para></listitem>
308 </varlistentry>
310 <varlistentry><term>group_mapping.tdb*</term>
311 <listitem><para>group mapping information</para></listitem>
312 </varlistentry>
314 <varlistentry><term>locking.tdb</term>
315 <listitem><para>share modes &amp; oplocks</para></listitem>
316 </varlistentry>
318 <varlistentry><term>login_cache.tdb*</term>
319 <listitem><para>bad pw attempts</para></listitem>
320 </varlistentry>
322 <varlistentry><term>messages.tdb</term>
323 <listitem><para>Samba messaging system</para></listitem>
324 </varlistentry>
326 <varlistentry><term>netsamlogon_cache.tdb*</term>
327 <listitem><para>cache of user net_info_3 struct from net_samlogon() request (as a domain member)</para></listitem>
328 </varlistentry>
330 <varlistentry><term>ntdrivers.tdb*</term>
331 <listitem><para>installed printer drivers</para></listitem>
332 </varlistentry>
334 <varlistentry><term>ntforms.tdb*</term>
335 <listitem><para>installed printer forms</para></listitem>
336 </varlistentry>
338 <varlistentry><term>ntprinters.tdb*</term>
339 <listitem><para>installed printer information</para></listitem>
340 </varlistentry>
342 <varlistentry><term>printing/</term>
343 <listitem><para>directory containing tdb per print queue of cached lpq output</para></listitem>
344 </varlistentry>
346 <varlistentry><term>registry.tdb</term>
347 <listitem><para>Windows registry skeleton (connect via regedit.exe)</para></listitem>
348 </varlistentry>
350 <varlistentry><term>sessionid.tdb</term>
351 <listitem><para>session information (e.g. support for 'utmp = yes')</para></listitem>
352 </varlistentry>
354 <varlistentry><term>share_info.tdb*</term>
355 <listitem><para>share acls</para></listitem>
356 </varlistentry>
358 <varlistentry><term>winbindd_cache.tdb</term>
359 <listitem><para>winbindd's cache of user lists, etc...</para></listitem>
360 </varlistentry>
362 <varlistentry><term>winbindd_idmap.tdb*</term>
363 <listitem><para>winbindd's local idmap db</para></listitem>
364 </varlistentry>
366 <varlistentry><term>wins.dat*</term>
367 <listitem><para>wins database when 'wins support = yes'</para></listitem>
368 </varlistentry>
370 </variablelist>
372 </refsect1>
374 <refsect1>
375         <title>SIGNALS</title>
377         <para>Sending the <command>smbd</command> a SIGHUP will cause it to 
378         reload its <filename>smb.conf</filename> configuration 
379         file within a short period of time.</para>
381         <para>To shut down a user's <command>smbd</command> process it is recommended 
382         that <command>SIGKILL (-9)</command> <emphasis>NOT</emphasis> 
383         be used, except as a last resort, as this may leave the shared
384         memory area in an inconsistent state. The safe way to terminate 
385         an <command>smbd</command> is to send it a SIGTERM (-15) signal and wait for 
386         it to die on its own.</para>
388         <para>The debug log level of <command>smbd</command> may be raised
389         or lowered using <citerefentry><refentrytitle>smbcontrol</refentrytitle>
390         <manvolnum>1</manvolnum></citerefentry> program (SIGUSR[1|2] signals are no longer 
391         used since Samba 2.2). This is to allow transient problems to be diagnosed, 
392         whilst still running at a normally low log level.</para>
394         <para>Note that as the signal handlers send a debug write, 
395         they are not re-entrant in <command>smbd</command>. This you should wait until 
396         <command>smbd</command> is in a state of waiting for an incoming SMB before 
397         issuing them. It is possible to make the signal handlers safe 
398         by un-blocking the signals before the select call and re-blocking 
399         them after, however this would affect performance.</para>
400 </refsect1>
402 <refsect1>
403         <title>SEE ALSO</title>
404         <para><citerefentry><refentrytitle>hosts_access</refentrytitle>
405         <manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>inetd</refentrytitle>
406         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>nmbd</refentrytitle>
407         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smb.conf</refentrytitle>
408         <manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbclient</refentrytitle>
409         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testparm</refentrytitle>
410         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testprns</refentrytitle>
411         <manvolnum>1</manvolnum></citerefentry>, and the 
412         Internet RFC's  <filename>rfc1001.txt</filename>, <filename>rfc1002.txt</filename>. 
413         In addition the CIFS (formerly SMB) specification is available 
414         as a link from the Web page <ulink noescape="1" url="http://samba.org/cifs/"> 
415         http://samba.org/cifs/</ulink>.</para>
416 </refsect1>
418 <refsect1>
419         <title>AUTHOR</title>
420         
421         <para>The original Samba software and related utilities 
422         were created by Andrew Tridgell. Samba is now developed
423         by the Samba Team as an Open Source project similar 
424         to the way the Linux kernel is developed.</para>
425         
426         <para>The original Samba man pages were written by Karl Auer. 
427         The man page sources were converted to YODL format (another 
428         excellent piece of Open Source software, available at <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
429         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
430         release by Jeremy Allison.  The conversion to DocBook for 
431         Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
432         Samba 3.0 was done by Alexander Bokovoy.</para>
433 </refsect1>
435 </refentry>