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