Fix samba-docs build after svn conversion and Samba3 By Example addition.
[Samba.git] / docs / manpages / smbd.8.xml
blobcf98be9fcb562304992ecab76edd083f2e5d58c4
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&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&gt;</term>
140                 <listitem><para><replaceable>port number</replaceable> is a positive integer 
141                 value.  The default value if this parameter is not 
142                 specified is 139.</para>
143                 
144                 <para>This number is the port number that will be 
145                 used when making connections to the server from client 
146                 software. The standard (well-known) port number for the 
147                 SMB over TCP is 139, hence the default. If you wish to 
148                 run the server as an ordinary user rather than
149                 as root, most systems will require you to use a port 
150                 number greater than 1024 - ask your system administrator 
151                 for help if you are in this situation.</para>
152                 
153                 <para>In order for the server to be useful by most 
154                 clients, should you configure it on a port other 
155                 than 139, you will require port redirection services 
156                 on port 139, details of which are outlined in rfc1002.txt 
157                 section 4.3.5.</para>
158                 
159                 <para>This parameter is not normally specified except 
160                 in the above situation.</para></listitem>
161                 </varlistentry>
162         </variablelist>
163 </refsect1>
165 <refsect1>
166         <title>FILES</title>
168         <variablelist>
169                 <varlistentry>
170                 <term><filename>/etc/inetd.conf</filename></term>
171                 <listitem><para>If the server is to be run by the 
172                 <command>inetd</command> meta-daemon, this file 
173                 must contain suitable startup information for the 
174                 meta-daemon. 
175                 </para></listitem>
176                 </varlistentry>
177                 
178                 <varlistentry>
179                 <term><filename>/etc/rc</filename></term>
180                 <listitem><para>or whatever initialization script your 
181                 system uses).</para>
183                 <para>If running the server as a daemon at startup, 
184                 this file will need to contain an appropriate startup 
185                 sequence for the server. </para></listitem>
186                 </varlistentry>
187                 
188                 <varlistentry>
189                 <term><filename>/etc/services</filename></term>
190                 <listitem><para>If running the server via the 
191                 meta-daemon <command>inetd</command>, this file 
192                 must contain a mapping of service name (e.g., netbios-ssn) 
193                 to service port (e.g., 139) and protocol type (e.g., tcp). 
194                 </para></listitem>
195                 </varlistentry>
196                 
197                 <varlistentry>
198                 <term><filename>/usr/local/samba/lib/smb.conf</filename></term>
199                 <listitem><para>This is the default location of the <citerefentry><refentrytitle>smb.conf</refentrytitle>
200                 <manvolnum>5</manvolnum></citerefentry> server configuration file. Other common places that systems 
201                 install this file are <filename>/usr/samba/lib/smb.conf</filename> 
202                 and <filename>/etc/samba/smb.conf</filename>.</para>
203                 
204                 <para>This file describes all the services the server 
205                 is to make available to clients. See <citerefentry><refentrytitle>smb.conf</refentrytitle>
206                 <manvolnum>5</manvolnum></citerefentry> for more information.</para>
207                 </listitem>
208                 </varlistentry>
209         </variablelist>
210 </refsect1>
212 <refsect1>
213         <title>LIMITATIONS</title>
214         <para>On some systems <command>smbd</command> cannot change uid back 
215         to root after a setuid() call.  Such systems are called 
216         trapdoor uid systems. If you have such a system, 
217         you will be unable to connect from a client (such as a PC) as 
218         two different users at once. Attempts to connect the
219         second user will result in access denied or 
220         similar.</para>
221 </refsect1>
223 <refsect1>
224         <title>ENVIRONMENT VARIABLES</title>
226         <variablelist>
227                 <varlistentry>
228                 <term><envar>PRINTER</envar></term>
229                 <listitem><para>If no printer name is specified to 
230                 printable services, most systems will use the value of 
231                 this variable (or <constant>lp</constant> if this variable is 
232                 not defined) as the name of the printer to use. This 
233                 is not specific to the server, however.</para></listitem>
234                 </varlistentry>
235         </variablelist>
236 </refsect1>
239 <refsect1>
240         <title>PAM INTERACTION</title>
241         <para>Samba uses PAM for authentication (when presented with a plaintext 
242         password), for account checking (is this account disabled?) and for
243         session management.  The degree too which samba supports PAM is restricted
244         by the limitations of the SMB protocol and the <smbconfoption><name>obey pam restrictions</name></smbconfoption> <citerefentry><refentrytitle>smb.conf</refentrytitle>
245         <manvolnum>5</manvolnum></citerefentry> paramater.  When this is set, the following restrictions apply:
246         </para>
248         <itemizedlist>
249         <listitem><para><emphasis>Account Validation</emphasis>:  All accesses to a 
250         samba server are checked 
251         against PAM to see if the account is vaild, not disabled and is permitted to 
252         login at this time.  This also applies to encrypted logins.
253         </para></listitem>
255         <listitem><para><emphasis>Session Management</emphasis>:  When not using share 
256         level secuirty, users must pass PAM's session checks before access 
257         is granted.  Note however, that this is bypassed in share level secuirty.  
258         Note also that some older pam configuration files may need a line 
259         added for session support. 
260         </para></listitem>
261         </itemizedlist>
262 </refsect1>
264 <refsect1>
265         <title>VERSION</title>
267         <para>This man page is correct for version 3.0 of 
268         the Samba suite.</para>
269 </refsect1>
271 <refsect1>
272         <title>DIAGNOSTICS</title>
274         <para>Most diagnostics issued by the server are logged 
275         in a specified log file. The log file name is specified 
276         at compile time, but may be overridden on the command line.</para>
278         <para>The number and nature of diagnostics available depends 
279         on the debug level used by the server. If you have problems, set 
280         the debug level to 3 and peruse the log files.</para>
282         <para>Most messages are reasonably self-explanatory. Unfortunately, 
283         at the time this man page was created, there are too many diagnostics 
284         available in the source code to warrant describing each and every 
285         diagnostic. At this stage your best bet is still to grep the 
286         source code and inspect the conditions that gave rise to the 
287         diagnostics you are seeing.</para>
288 </refsect1>
290 <refsect1>
291         <title>SIGNALS</title>
293         <para>Sending the <command>smbd</command> a SIGHUP will cause it to 
294         reload its <filename>smb.conf</filename> configuration 
295         file within a short period of time.</para>
297         <para>To shut down a user's <command>smbd</command> process it is recommended 
298         that <command>SIGKILL (-9)</command> <emphasis>NOT</emphasis> 
299         be used, except as a last resort, as this may leave the shared
300         memory area in an inconsistent state. The safe way to terminate 
301         an <command>smbd</command> is to send it a SIGTERM (-15) signal and wait for 
302         it to die on its own.</para>
304         <para>The debug log level of <command>smbd</command> may be raised
305         or lowered using <citerefentry><refentrytitle>smbcontrol</refentrytitle>
306         <manvolnum>1</manvolnum></citerefentry> program (SIGUSR[1|2] signals are no longer 
307         used since Samba 2.2). This is to allow transient problems to be diagnosed, 
308         whilst still running at a normally low log level.</para>
310         <para>Note that as the signal handlers send a debug write, 
311         they are not re-entrant in <command>smbd</command>. This you should wait until 
312         <command>smbd</command> is in a state of waiting for an incoming SMB before 
313         issuing them. It is possible to make the signal handlers safe 
314         by un-blocking the signals before the select call and re-blocking 
315         them after, however this would affect performance.</para>
316 </refsect1>
318 <refsect1>
319         <title>SEE ALSO</title>
320         <para><citerefentry><refentrytitle>hosts_access</refentrytitle>
321         <manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>inetd</refentrytitle>
322         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>nmbd</refentrytitle>
323         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smb.conf</refentrytitle>
324         <manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbclient</refentrytitle>
325         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testparm</refentrytitle>
326         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testprns</refentrytitle>
327         <manvolnum>1</manvolnum></citerefentry>, and the 
328         Internet RFC's  <filename>rfc1001.txt</filename>, <filename>rfc1002.txt</filename>. 
329         In addition the CIFS (formerly SMB) specification is available 
330         as a link from the Web page <ulink noescape="1" url="http://samba.org/cifs/"> 
331         http://samba.org/cifs/</ulink>.</para>
332 </refsect1>
334 <refsect1>
335         <title>AUTHOR</title>
336         
337         <para>The original Samba software and related utilities 
338         were created by Andrew Tridgell. Samba is now developed
339         by the Samba Team as an Open Source project similar 
340         to the way the Linux kernel is developed.</para>
341         
342         <para>The original Samba man pages were written by Karl Auer. 
343         The man page sources were converted to YODL format (another 
344         excellent piece of Open Source software, available at <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
345         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
346         release by Jeremy Allison.  The conversion to DocBook for 
347         Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
348         Samba 3.0 was done by Alexander Bokovoy.</para>
349 </refsect1>
351 </refentry>