This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[samba.git] / docs / manpages / smbd.8
1 .\" This manpage has been automatically generated by docbook2man 
2 .\" from a DocBook document.  This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBD" "8" "01 October 2002" "" ""
7 .SH NAME
8 smbd \- server to provide SMB/CIFS services to clients
9 .SH SYNOPSIS
10
11 \fBsmbd\fR [ \fB-D\fR ] [ \fB-a\fR ] [ \fB-i\fR ] [ \fB-o\fR ] [ \fB-P\fR ] [ \fB-h\fR ] [ \fB-V\fR ] [ \fB-b\fR ] [ \fB-d <debug level>\fR ] [ \fB-l <log directory>\fR ] [ \fB-p <port number>\fR ] [ \fB-O <socket option>\fR ] [ \fB-s <configuration file>\fR ]
12
13 .SH "DESCRIPTION"
14 .PP
15 This program is part of the Samba suite.
16 .PP
17 \fBsmbd\fR is the server daemon that 
18 provides filesharing and printing services to Windows clients. 
19 The server provides filespace and printer services to
20 clients using the SMB (or CIFS) protocol. This is compatible 
21 with the LanManager protocol, and can service LanManager 
22 clients.  These include MSCLIENT 3.0 for DOS, Windows for 
23 Workgroups, Windows 95/98/ME, Windows NT, Windows 2000, 
24 OS/2, DAVE for Macintosh, and smbfs for Linux.
25 .PP
26 An extensive description of the services that the 
27 server can provide is given in the man page for the 
28 configuration file controlling the attributes of those 
29 services (see \fIsmb.conf(5)
30 \fR  This man page will not describe the 
31 services, but will concentrate on the administrative aspects 
32 of running the server.
33 .PP
34 Please note that there are significant security 
35 implications to running this server, and the \fIsmb.conf(5)\fR 
36 manpage should be regarded as mandatory reading before 
37 proceeding with installation.
38 .PP
39 A session is created whenever a client requests one. 
40 Each client gets a copy of the server for each session. This 
41 copy then services all connections made by the client during 
42 that session. When all connections from its client are closed, 
43 the copy of the server for that client terminates.
44 .PP
45 The configuration file, and any files that it includes, 
46 are automatically reloaded every minute, if they change.  You 
47 can force a reload by sending a SIGHUP to the server.  Reloading 
48 the configuration file will not affect connections to any service 
49 that is already established.  Either the user will have to 
50 disconnect from the service, or \fBsmbd\fR killed and restarted.
51 .SH "OPTIONS"
52 .TP
53 \fB-D\fR
54 If specified, this parameter causes 
55 the server to operate as a daemon. That is, it detaches 
56 itself and runs in the background, fielding requests 
57 on the appropriate port. Operating the server as a
58 daemon is the recommended way of running \fBsmbd\fR for 
59 servers that provide more than casual use file and 
60 print services.  This switch is assumed if \fBsmbd
61 \fR is executed on the command line of a shell.
62 .TP
63 \fB-a\fR
64 If this parameter is specified, each new 
65 connection will append log messages to the log file.  
66 This is the default.
67 .TP
68 \fB-i\fR
69 If this parameter is specified it causes the
70 server to run "interactively", not as a daemon, even if the
71 server is executed on the command line of a shell. Setting this
72 parameter negates the implicit deamon mode when run from the
73 command line.
74 .TP
75 \fB-o\fR
76 If this parameter is specified, the 
77 log files will be overwritten when opened.  By default, 
78 \fBsmbd\fR will append entries to the log 
79 files.
80 .TP
81 \fB-P\fR
82 Passive option. Causes \fBsmbd\fR not to 
83 send any network traffic out. Used for debugging by 
84 the developers only.
85 .TP
86 \fB-h\fR
87 Prints the help information (usage) 
88 for \fBsmbd\fR.
89 .TP
90 \fB-v\fR
91 Prints the version number for 
92 \fBsmbd\fR.
93 .TP
94 \fB-b\fR
95 Prints information about how 
96 Samba was built.
97 .TP
98 \fB-d <debug level>\fR
99 \fIdebuglevel\fR is an integer 
100 from 0 to 10.  The default value if this parameter is 
101 not specified is zero.
102
103 The higher this value, the more detail will be 
104 logged to the log files about the activities of the 
105 server. At level 0, only critical errors and serious 
106 warnings will be logged. Level 1 is a reasonable level for
107 day to day running - it generates a small amount of 
108 information about operations carried out.
109
110 Levels above 1 will generate considerable 
111 amounts of log data, and should only be used when 
112 investigating a problem. Levels above 3 are designed for 
113 use only by developers and generate HUGE amounts of log
114 data, most of which is extremely cryptic.
115
116 Note that specifying this parameter here will 
117 override the log
118 level file.
119 .TP
120 \fB-l <log directory>\fR
121 If specified,
122 \fIlog directory\fR 
123 specifies a log directory into which the "log.smbd" log
124 file will be created for informational and debug 
125 messages from the running server. The log 
126 file generated is never removed by the server although 
127 its size may be controlled by the max log size
128 option in the \fI  smb.conf(5)\fR file. \fBBeware:\fR
129 If the directory specified does not exist, \fBsmbd\fR
130 will log to the default debug log location defined at compile time.
131
132 The default log directory is specified at
133 compile time.
134 .TP
135 \fB-O <socket options>\fR
136 See the socket options 
137 parameter in the \fIsmb.conf(5)
138 \fR file for details.
139 .TP
140 \fB-p <port number>\fR
141 \fIport number\fR is a positive integer 
142 value.  The default value if this parameter is not 
143 specified is 139.
144
145 This number is the port number that will be 
146 used when making connections to the server from client 
147 software. The standard (well-known) port number for the 
148 SMB over TCP is 139, hence the default. If you wish to 
149 run the server as an ordinary user rather than
150 as root, most systems will require you to use a port 
151 number greater than 1024 - ask your system administrator 
152 for help if you are in this situation.
153
154 In order for the server to be useful by most 
155 clients, should you configure it on a port other 
156 than 139, you will require port redirection services 
157 on port 139, details of which are outlined in rfc1002.txt 
158 section 4.3.5.
159
160 This parameter is not normally specified except 
161 in the above situation.
162 .TP
163 \fB-s <configuration file>\fR
164 The file specified contains the 
165 configuration details required by the server.  The 
166 information in this file includes server-specific
167 information such as what printcap file to use, as well 
168 as descriptions of all the services that the server is 
169 to provide. See \fI  smb.conf(5)\fR for more information.
170 The default configuration file name is determined at 
171 compile time.
172 .SH "FILES"
173 .TP
174 \fB\fI/etc/inetd.conf\fB\fR
175 If the server is to be run by the 
176 \fBinetd\fR meta-daemon, this file 
177 must contain suitable startup information for the 
178 meta-daemon. See the UNIX_INSTALL.html
179 document for details.
180 .TP
181 \fB\fI/etc/rc\fB\fR
182 or whatever initialization script your 
183 system uses).
184
185 If running the server as a daemon at startup, 
186 this file will need to contain an appropriate startup 
187 sequence for the server. See the UNIX_INSTALL.html
188 document for details.
189 .TP
190 \fB\fI/etc/services\fB\fR
191 If running the server via the 
192 meta-daemon \fBinetd\fR, this file 
193 must contain a mapping of service name (e.g., netbios-ssn) 
194 to service port (e.g., 139) and protocol type (e.g., tcp). 
195 See the UNIX_INSTALL.html
196 document for details.
197 .TP
198 \fB\fI/usr/local/samba/lib/smb.conf\fB\fR
199 This is the default location of the 
200 \fIsmb.conf\fR
201 server configuration file. Other common places that systems 
202 install this file are \fI/usr/samba/lib/smb.conf\fR 
203 and \fI/etc/smb.conf\fR.
204
205 This file describes all the services the server 
206 is to make available to clients. See   \fIsmb.conf(5)\fR for more information.
207 .SH "LIMITATIONS"
208 .PP
209 On some systems \fBsmbd\fR cannot change uid back 
210 to root after a setuid() call.  Such systems are called 
211 trapdoor uid systems. If you have such a system, 
212 you will be unable to connect from a client (such as a PC) as 
213 two different users at once. Attempts to connect the
214 second user will result in access denied or 
215 similar.
216 .SH "ENVIRONMENT VARIABLES"
217 .TP
218 \fBPRINTER\fR
219 If no printer name is specified to 
220 printable services, most systems will use the value of 
221 this variable (or lp if this variable is 
222 not defined) as the name of the printer to use. This 
223 is not specific to the server, however.
224 .SH "PAM INTERACTION"
225 .PP
226 Samba uses PAM for authentication (when presented with a plaintext 
227 password), for account checking (is this account disabled?) and for
228 session management.  The degree too which samba supports PAM is restricted
229 by the limitations of the SMB protocol and the 
230 obey pam restricions
231 smb.conf paramater.  When this is set, the following restrictions apply:
232 .TP 0.2i
233 \(bu
234 \fBAccount Validation\fR:  All acccesses to a 
235 samba server are checked 
236 against PAM to see if the account is vaild, not disabled and is permitted to 
237 login at this time.  This also applies to encrypted logins.
238 .TP 0.2i
239 \(bu
240 \fBSession Management\fR:  When not using share 
241 level secuirty, users must pass PAM's session checks before access 
242 is granted.  Note however, that this is bypassed in share level secuirty.  
243 Note also that some older pam configuration files may need a line 
244 added for session support. 
245 .SH "VERSION"
246 .PP
247 This man page is correct for version 2.2 of 
248 the Samba suite.
249 .SH "DIAGNOSTICS"
250 .PP
251 Most diagnostics issued by the server are logged 
252 in a specified log file. The log file name is specified 
253 at compile time, but may be overridden on the command line.
254 .PP
255 The number and nature of diagnostics available depends 
256 on the debug level used by the server. If you have problems, set 
257 the debug level to 3 and peruse the log files.
258 .PP
259 Most messages are reasonably self-explanatory. Unfortunately, 
260 at the time this man page was created, there are too many diagnostics 
261 available in the source code to warrant describing each and every 
262 diagnostic. At this stage your best bet is still to grep the 
263 source code and inspect the conditions that gave rise to the 
264 diagnostics you are seeing.
265 .SH "SIGNALS"
266 .PP
267 Sending the \fBsmbd\fR a SIGHUP will cause it to 
268 reload its \fIsmb.conf\fR configuration 
269 file within a short period of time.
270 .PP
271 To shut down a user's \fBsmbd\fR process it is recommended 
272 that \fBSIGKILL (-9)\fR \fBNOT\fR 
273 be used, except as a last resort, as this may leave the shared
274 memory area in an inconsistent state. The safe way to terminate 
275 an \fBsmbd\fR is to send it a SIGTERM (-15) signal and wait for 
276 it to die on its own.
277 .PP
278 The debug log level of \fBsmbd\fR may be raised
279 or lowered using \fBsmbcontrol(1)
280 \fR program (SIGUSR[1|2] signals are no longer used in
281 Samba 2.2). This is to allow transient problems to be diagnosed, 
282 whilst still running at a normally low log level.
283 .PP
284 Note that as the signal handlers send a debug write, 
285 they are not re-entrant in \fBsmbd\fR. This you should wait until 
286 \fBsmbd\fR is in a state of waiting for an incoming SMB before 
287 issuing them. It is possible to make the signal handlers safe 
288 by un-blocking the signals before the select call and re-blocking 
289 them after, however this would affect performance.
290 .SH "SEE ALSO"
291 .PP
292 hosts_access(5), \fBinetd(8)\fR, 
293 \fBnmbd(8)\fR 
294 \fIsmb.conf(5)\fR
295  \fBsmbclient(1)
296 \fR and the Internet RFC's
297 \fIrfc1001.txt\fR, \fIrfc1002.txt\fR. 
298 In addition the CIFS (formerly SMB) specification is available 
299 as a link from the Web page  
300 http://samba.org/cifs/ <URL:http://samba.org/cifs/>.
301 .SH "AUTHOR"
302 .PP
303 The original Samba software and related utilities 
304 were created by Andrew Tridgell. Samba is now developed
305 by the Samba Team as an Open Source project similar 
306 to the way the Linux kernel is developed.
307 .PP
308 The original Samba man pages were written by Karl Auer. 
309 The man page sources were converted to YODL format (another 
310 excellent piece of Open Source software, available at
311 ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 
312 release by Jeremy Allison.  The conversion to DocBook for 
313 Samba 2.2 was done by Gerald Carter